changeset 5632:6e9a14b3c299

[project @ 2006-02-24 18:38:28 by jwe]
author jwe
date Fri, 24 Feb 2006 18:38:28 +0000
parents 7171d19706df
children 92f8b2723c8c
files liboctave/Array.cc liboctave/Array.h liboctave/ChangeLog
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/Array.cc	Wed Feb 22 20:16:00 2006 +0000
+++ b/liboctave/Array.cc	Fri Feb 24 18:38:28 2006 +0000
@@ -3176,6 +3176,8 @@
 	    }
 	}
 
+      lhs.clear_index ();
+
       if (retval != 0)
 	lhs = lhs.reshape (final_lhs_dims);
     }
--- a/liboctave/Array.h	Wed Feb 22 20:16:00 2006 +0000
+++ b/liboctave/Array.h	Fri Feb 24 18:38:28 2006 +0000
@@ -234,11 +234,11 @@
 	  rep->count++;
 
 	  dimensions = a.dimensions;
+
+	  idx_count = 0;
+	  idx = 0;
 	}
 
-      idx_count = 0;
-      idx = 0;
-
       return *this;
     }
 
--- a/liboctave/ChangeLog	Wed Feb 22 20:16:00 2006 +0000
+++ b/liboctave/ChangeLog	Fri Feb 24 18:38:28 2006 +0000
@@ -1,3 +1,9 @@
+2006-02-24  John W. Eaton  <jwe@octave.org>
+
+	* Array.cc (assignN): Clear index before reshaping.
+
+	* Array.h (Array<T>::operator =): Don't set idx to 0 if copying self.
+
 2006-02-20  David Bateman  <dbateman@free.fr>
 
 	* dSparse.cc (dsolve, utsolve, ltsolve): Remove restriction that