# HG changeset patch # User John W. Eaton # Date 1295839889 18000 # Node ID 0364b6c76b37db7804fc076062d058fa20ca01c8 # Parent 16b050c1a25ccb42cd8630f62f82462fda269b6a octave_scalar_struct::print_raw: avoid unnecessary conversion of map contents to Cell diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-01-23 John W. Eaton + + * ov-struct.cc (octave_scalar_struct::print_raw): + Avoid unnecessary conversion of map value to Cell. + 2011-01-22 John W. Eaton * symtab.h (symbol_table::parent_classes): diff --git a/src/ov-struct.cc b/src/ov-struct.cc --- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -1337,20 +1337,18 @@ { std::string key = key_list[i]; - Cell val = map.contents (key); - - octave_value tmp = val(0); + octave_value val = map.contents (key); if (print_fieldnames_only) { indent (os); os << key; - dim_vector dv = tmp.dims (); - os << ": " << dv.str () << " " << tmp.type_name (); + dim_vector dv = val.dims (); + os << ": " << dv.str () << " " << val.type_name (); newline (os); } else - tmp.print_with_name (os, key); + val.print_with_name (os, key); } decrement_indent_level ();