Mercurial > hg > octave-lojdl
changeset 8179:6c08e3921d3e
imported patch maybe_delete_fix.diff
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 03 Oct 2008 13:04:14 +0200 |
parents | af41e2094993 |
children | da48d2ca096f |
files | liboctave/Array.cc liboctave/Array.h liboctave/ChangeLog src/Cell.cc src/ChangeLog src/ov-base-mat.cc |
diffstat | 6 files changed, 20 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -1776,7 +1776,7 @@ template <class T> void -Array<T>::maybe_delete_elements (Array<idx_vector>& ra_idx, const T& rfv) +Array<T>::maybe_delete_elements (Array<idx_vector>& ra_idx) { octave_idx_type n_idx = ra_idx.length (); @@ -1804,7 +1804,7 @@ if (n_idx == 1 && ra_idx(0).is_colon ()) { - resize (dim_vector (0, 0), rfv); + resize (dim_vector (0, 0)); return; } @@ -1899,7 +1899,7 @@ dim_vector newdim = dims (); newdim(0) = 0; - resize (newdim, rfv); + resize (newdim); } else if (n_idx > 1 @@ -1979,7 +1979,7 @@ dim_vector zero_dims (n_idx, 0); - resize (zero_dims, rfv); + resize (zero_dims); } else {
--- a/liboctave/Array.h +++ b/liboctave/Array.h @@ -500,7 +500,7 @@ void maybe_delete_elements (idx_vector& i, idx_vector& j, idx_vector& k); - void maybe_delete_elements (Array<idx_vector>& ra_idx, const T& rfv); + void maybe_delete_elements (Array<idx_vector>& ra_idx); Array<T> value (void) const;
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,10 @@ +2008-10-03 Jaroslav Hajek <highegg@gmail.com> + + * Array.h (Array<T>::maybe_delete_elements): Remove rfv argument from + declaration. + * Array.cc (Array<T>::maybe_delete_elements): Remove all usages of + rfv. + 2008-10-03 Jaroslav Hajek <highegg@gmail.com> * Array.cc (assignN): Do not call maybe_delete_elements when
--- a/src/Cell.cc +++ b/src/Cell.cc @@ -180,7 +180,7 @@ for (octave_idx_type i = 0; i < idx_arg.length (); i++) ra_idx.xelem (i) = idx_arg(i).index_vector (); - maybe_delete_elements (ra_idx, octave_value ()); + maybe_delete_elements (ra_idx); return *this; }
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-10-03 Jaroslav Hajek <highegg@gmail.com> + + * Cell.cc (Cell::delete_elements): Don't pass second arg to + Array<T>::maybe_delete_elements. + * ov-base-mat.cc (octave_base_matrix<MT>::delete_elements): Dtto. + 2008-10-02 Jaroslav Hajek <highegg@gmail.com> * Cell.h (Cell::delete_elements): Declare new member function.
--- a/src/ov-base-mat.cc +++ b/src/ov-base-mat.cc @@ -216,7 +216,7 @@ for (octave_idx_type i = 0; i < len; i++) ra_idx(i) = idx(i).index_vector (); - matrix.maybe_delete_elements (ra_idx, MT::resize_fill_value ()); + matrix.maybe_delete_elements (ra_idx); // Invalidate the matrix type typ.invalidate_type ();