Mercurial > hg > octave-lyh
changeset 6525:25f3fb4a6f1b
[project @ 2007-04-13 16:18:29 by jwe]
author | jwe |
---|---|
date | Fri, 13 Apr 2007 16:18:29 +0000 |
parents | 03c89ade4070 |
children | 2a715c6409a5 |
files | liboctave/Array.cc liboctave/ChangeLog |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -1402,9 +1402,6 @@ octave_idx_type nr = dim1 (); octave_idx_type nc = dim2 (); - if (nr == 0 && nc == 0) - return; - octave_idx_type n; if (nr == 1) n = nc; @@ -1419,7 +1416,7 @@ nc = n; } - if (idx_arg.is_colon_equiv (n, 1)) + if (nr > 0 && nc > 0 && idx_arg.is_colon_equiv (n, 1)) { // Either A(:) = [] or A(idx) = [] with idx enumerating all // elements, so we delete all elements and return [](0x0). To
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2007-04-13 John W. Eaton <jwe@octave.org> + + * Array.cc (Array<T>::maybe_delete_elements_2): Don't return early + for empty matrix. Only check for colon index equivalence if not empty. + 2007-04-10 John W. Eaton <jwe@octave.org> * SparseCmplxQR.cc