Mercurial > octave-nkf
diff src/ov-struct.cc @ 5880:84ca47e311b3
[project @ 2006-07-06 22:34:48 by jwe]
author | jwe |
---|---|
date | Thu, 06 Jul 2006 22:36:00 +0000 |
parents | 22e23bee74c8 |
children | c20eb7330d13 |
line wrap: on
line diff
--- a/src/ov-struct.cc Wed Jul 05 23:51:24 2006 +0000 +++ b/src/ov-struct.cc Thu Jul 06 22:36:00 2006 +0000 @@ -416,10 +416,6 @@ void octave_struct::print_raw (std::ostream& os, bool) const { - // FIXME -- would be nice to print the output in some - // standard order. Maybe all substructures first, maybe - // alphabetize entries, etc. - unwind_protect::begin_frame ("octave_struct_print"); unwind_protect_int (Vstruct_levels_to_print); @@ -450,10 +446,13 @@ increment_indent_level (); } - for (Octave_map::const_iterator p = map.begin (); p != map.end (); p++) + string_vector key_list = map.keys (); + + for (octave_idx_type i = 0; i < key_list.length (); i++) { - std::string key = map.key (p); - Cell val = map.contents (p); + std::string key = key_list[i]; + + Cell val = map.contents (key); octave_value tmp = (n == 1) ? val(0) : octave_value (val, true);