Mercurial > hg > octave-lojdl
changeset 6127:5ea7e62233f2
[project @ 2006-11-01 05:34:45 by jwe]
author | jwe |
---|---|
date | Wed, 01 Nov 2006 05:34:45 +0000 |
parents | c0011bf8f815 |
children | 3e7802d42172 |
files | src/ChangeLog src/ov-range.h |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-10-31 John W. Eaton <jwe@octave.org> + + * ov-range.h (octave_range::empty_clone): Return octave_matrix + object instead of octave_range. + 2006-10-29 Juhani Saastamoinen <juhani@cs.joensuu.fi> * ls-mat5.cc (read_mat5_tag): Declare bytes as int32_t, not just int.
--- a/src/ov-range.h +++ b/src/ov-range.h @@ -40,6 +40,7 @@ #include "error.h" #include "oct-stream.h" #include "ov-base.h" +#include "ov-re-mat.h" #include "ov-typeinfo.h" class Octave_map; @@ -77,7 +78,11 @@ ~octave_range (void) { } octave_base_value *clone (void) const { return new octave_range (*this); } - octave_base_value *empty_clone (void) const { return new octave_range (); } + + // A range is really just a special kind of real matrix object. In + // the places where we need to call empty_clone, it makes more sense + // to create an empty matrix (0x0) instead of an empty range (1x0). + octave_base_value *empty_clone (void) const { return new octave_matrix (); } type_conv_fcn numeric_conversion_function (void) const;