Mercurial > hg > octave-terminal
changeset 11070:686d5bd22132
ov-fcn-inline.cc: use octve_scalar_map instead of Octave_map
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 01 Oct 2010 04:36:31 -0400 |
parents | e40e19761d06 |
children | 629f6fc20dc5 |
files | src/ChangeLog src/ov-fcn-inline.cc |
diffstat | 2 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-10-01 John W. Eaton <jwe@octave.org> + + * ov-fcn-inline.cc (octave_fcn_inline::map_value): Use + octave_scalar_map and octave_map instead of Octave_map. + 2010-10-01 John W. Eaton <jwe@octave.org> * variables.cc (symbol_info_list::map_value): Use
--- a/src/ov-fcn-inline.cc +++ b/src/ov-fcn-inline.cc @@ -120,17 +120,23 @@ octave_map octave_fcn_inline::map_value (void) const { - Octave_map m; + octave_scalar_map m; + + m.assign ("version", 1.0); + m.assign ("isEmpty", 0.0); + m.assign ("expr", fcn_text ()); + string_vector args = fcn_arg_names (); - m.assign ("version", octave_value (1.0)); - m.assign ("isEmpty", octave_value (0.0)); - m.assign ("expr", octave_value (fcn_text ())); - m.assign ("numArgs", octave_value (args.length ())); - m.assign ("args", octave_value (args)); + + m.assign ("numArgs", args.length ()); + m.assign ("args", args); + std::ostringstream buf; + for (int i = 0; i < args.length (); i++) buf << args(i) << " = INLINE_INPUTS_{" << i + 1 << "}; "; - m.assign ("inputExpr", octave_value (buf.str ())); + + m.assign ("inputExpr", buf.str ()); return m; }