Mercurial > hg > octave-nkf
diff src/ov.cc @ 7651:443a8f5a50fd
require both subsref variants to be defined in octave_value subclasses
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 26 Mar 2008 22:09:42 -0400 |
parents | 8c32f95c2639 |
children | 87eda1f8faaa |
line wrap: on
line diff
--- a/src/ov.cc +++ b/src/ov.cc @@ -926,7 +926,7 @@ octave_value::subsref (const std::string& type, const std::list<octave_value_list>& idx, int nargout) { - if (is_constant ()) + if (nargout == 1) return rep->subsref (type, idx); else return rep->subsref (type, idx, nargout); @@ -1014,15 +1014,7 @@ // a specific function to call to handle the op= operation for // the types we have. - octave_value t; - if (is_constant ()) - t = subsref (type, idx); - else - { - octave_value_list tl = subsref (type, idx, 1); - if (tl.length () > 0) - t = tl(0); - } + octave_value t = subsref (type, idx); if (! error_state) {