Mercurial > octave-nkf
diff src/ov-complex.cc @ 3933:f9ea3dcf58ee
[project @ 2002-05-15 03:21:00 by jwe]
author | jwe |
---|---|
date | Wed, 15 May 2002 03:21:01 +0000 |
parents | 13905c3a24af |
children | 6e86256e9c54 |
line wrap: on
line diff
--- a/src/ov-complex.cc Tue May 07 18:10:44 2002 +0000 +++ b/src/ov-complex.cc Wed May 15 03:21:01 2002 +0000 @@ -60,24 +60,12 @@ return retval; } -static inline bool -valid_scalar_indices (const octave_value_list& args) -{ - int nargin = args.length (); - - for (int i = 0; i < nargin; i++) - if (! args(i).valid_as_scalar_index ()) - return false; - - return true; -} - octave_value -octave_complex::do_index_op (const octave_value_list& idx) +octave_complex::do_index_op (const octave_value_list& idx, int resize_ok) { octave_value retval; - if (valid_scalar_indices (idx)) + if (idx.valid_scalar_indices ()) retval = scalar; else { @@ -93,7 +81,7 @@ octave_value tmp (new octave_complex_matrix (complex_matrix_value ())); - retval = tmp.do_index_op (idx); + retval = tmp.do_index_op (idx, resize_ok); } return retval;