Mercurial > hg > octave-terminal
changeset 10355:f9347eac65dc
make string_vector be a column vector as it used to be
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 25 Feb 2010 08:21:35 +0100 |
parents | f074aa6b2c80 |
children | 1d7930b77ab9 |
files | liboctave/ChangeLog liboctave/str-vec.cc liboctave/str-vec.h |
diffstat | 3 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2010-02-25 Jaroslav Hajek <highegg@gmail.com> + + * str-vec.h (string_vector::string_vector): Use (n, 1). + (string_vector::resize): Ditto. + * str-vec.cc (string_vector::string_vector): Ditto. + 2010-02-24 Jaroslav Hajek <highegg@gmail.com> * Array.cc (Array::Array (const Array&, octave_idx_type,
--- a/liboctave/str-vec.cc +++ b/liboctave/str-vec.cc @@ -95,7 +95,7 @@ // nonnegative. string_vector::string_vector (const char * const *s, octave_idx_type n) - : Array<std::string> (1, n) + : Array<std::string> (n, 1) { for (octave_idx_type i = 0; i < n; i++) elem (i) = s[i];
--- a/liboctave/str-vec.h +++ b/liboctave/str-vec.h @@ -39,7 +39,7 @@ string_vector (void) : Array<std::string> () { } - explicit string_vector (octave_idx_type n) : Array<std::string> (1, n) { } + explicit string_vector (octave_idx_type n) : Array<std::string> (n, 1) { } string_vector (const char *s) : Array<std::string> (1, 1, s) { } @@ -84,7 +84,7 @@ } void resize (octave_idx_type n, const std::string& rfv = resize_fill_value ()) - { Array<std::string>::resize (1, n, rfv); } + { Array<std::string>::resize (n, 1, rfv); } std::string& operator[] (octave_idx_type i) { return Array<std::string>::elem (i); }