Mercurial > hg > octave-lyh
changeset 6720:fa2f5d4e55db
[project @ 2007-06-14 01:18:25 by dbateman]
author | dbateman |
---|---|
date | Thu, 14 Jun 2007 01:18:26 +0000 |
parents | 30e1320bb0ee |
children | 01036667884a |
files | src/ChangeLog src/ov-ch-mat.cc src/ov-ch-mat.h |
diffstat | 3 files changed, 18 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2007-06-14 David Bateman <dbateman@free.fr> + + * ov-ch-mat.h (idx_vector index_vector (void) const): Remove + definition. + * ov-ch-mat.cc (idx_vector index_vector (void) const): Move it + here. Special case ":" case for compatibility. + 2007-06-13 John W. Eaton <jwe@octave.org> * ov-re-mat.cc (octave_matrix::load_ascii):
--- a/src/ov-ch-mat.cc +++ b/src/ov-ch-mat.cc @@ -44,6 +44,16 @@ DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA (octave_char_matrix, "char matrix", "int8"); +idx_vector +octave_char_matrix::index_vector (void) const +{ + const char *p = matrix.data (); + if (numel () == 1 && *p == ':') + return idx_vector (':'); + else + return idx_vector (array_value (true)); +} + bool octave_char_matrix::valid_as_scalar_index (void) const {
--- a/src/ov-ch-mat.h +++ b/src/ov-ch-mat.h @@ -80,8 +80,7 @@ octave_base_value *clone (void) const { return new octave_char_matrix (*this); } octave_base_value *empty_clone (void) const { return new octave_char_matrix (); } - idx_vector index_vector (void) const - { return idx_vector (array_value (true)); } + idx_vector index_vector (void) const; bool is_char_matrix (void) const { return true; } bool is_real_matrix (void) const { return true; }