Mercurial > hg > octave-lojdl
changeset 4827:bb82599f039f
[project @ 2004-03-09 20:50:18 by jwe]
author | jwe |
---|---|
date | Tue, 09 Mar 2004 20:50:18 +0000 |
parents | a7b1e6122d0c |
children | e78bc84ac0d3 |
files | liboctave/Array.cc |
diffstat | 1 files changed, 6 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -2002,28 +2002,16 @@ int len = tmp.length (); - if (len == 0) + if ((len != 0 && idx_arg.one_zero_only ()) + || idx_orig_rows == 1 || idx_orig_columns == 1) { - if (idx_orig_rows == 0 || idx_orig_columns == 0) - retval = Array<T> (dim_vector (idx_orig_rows, idx_orig_columns)); - else if (nr == 1) - retval = Array<T> (dim_vector (1, 0)); + if (nr == 1) + retval = Array<T> (tmp, dim_vector (1, len)); else - retval = Array<T> (dim_vector (0, 1)); + retval = Array<T> (tmp, dim_vector (len, 1)); } else - { - if (idx_arg.one_zero_only () - || idx_orig_rows == 1 || idx_orig_columns == 1) - { - if (nr == 1) - retval = Array<T> (tmp, dim_vector (1, len)); - else - retval = Array<T> (tmp, dim_vector (len, 1)); - } - else - retval = Array<T> (tmp, dim_vector (idx_orig_rows, idx_orig_columns)); - } + retval = Array<T> (tmp, dim_vector (idx_orig_rows, idx_orig_columns)); } else {