diff liboctave/dim-vector.h @ 14624:edf9ca8a92a8 stable

when redimensioning, always pad dim_vector objects with 1 (bug #33216) * dim-vector.cc (dim_vector::redim): Always pad with 1. * dim-vector.h (dim_vector::redim): Update comment. * Array.cc (Array<T>::assign): Query dimensions for all zeros before redimensioning. * ov-struct.cc: New test.
author John W. Eaton <jwe@octave.org>
date Fri, 11 May 2012 12:33:13 -0400
parents 72c96de7a403
children bb5ecda3b975
line wrap: on
line diff
--- a/liboctave/dim-vector.h	Thu May 03 17:32:33 2012 -0400
+++ b/liboctave/dim-vector.h	Fri May 11 12:33:13 2012 -0400
@@ -381,8 +381,7 @@
   // Force certain dimensionality, preserving numel ().  Missing
   // dimensions are set to 1, redundant are folded into the trailing
   // one.  If n = 1, the result is 2d and the second dim is 1
-  // (dim_vectors are always at least 2D).  If the original dimensions
-  // were all zero, the padding value is zero.
+  // (dim_vectors are always at least 2D).
 
   dim_vector redim (int n) const;