Mercurial > octave-nkf
changeset 13784:0bbe319bf26b
octave_class::size: return matrix with correct dimensions
* ov-class.cc (octave_class::size): Call dim_vector::length, not
dim_vector::numel to determine the number of dimensions stored in the
dimension vector.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 01 Nov 2011 19:57:38 -0400 |
parents | d67c8bf52e20 |
children | daf81e42960c |
files | src/debug.cc src/ov-class.cc |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/debug.cc Tue Nov 01 17:21:07 2011 -0400 +++ b/src/debug.cc Tue Nov 01 19:57:38 2011 -0400 @@ -929,7 +929,7 @@ // interpreter is currently executing when the debugger is stopped in // some C++ function, for example. -static void +void show_octave_dbstack (void) { do_dbstack (octave_value_list (), 0, std::cerr);
--- a/src/ov-class.cc Tue Nov 01 17:21:07 2011 -0400 +++ b/src/ov-class.cc Tue Nov 01 19:57:38 2011 -0400 @@ -431,11 +431,11 @@ { dim_vector dv = dims (); - int nel = dv.numel (); + int nd = dv.length (); - retval.resize (1, nel); + retval.resize (1, nd); - for (int i = 0; i < nel; i++) + for (int i = 0; i < nd; i++) retval(i) = dv(i); }