-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep track of and preserve classdef properties order (bug #55961).
The order of properties in the classdef definition was lost, and they were returned - e.g., when displayed with function 'properties' - in alphabetical order. We now keep track of their original order and use this order in a (map) structure which is de facto sorted as expected. * cdef-class.h: Add new typedef "octave::property_key". (cdef_class, cdef_class::cdef_class_rep): Change map holding the classdef properties to use the new type as the key (instead of "std::string") for all relevant member functions and properties. (cdef_class_rep::find_properties_aux): Add new (helper) method. * cdef-class.cc (cdef_class::cdef_class_rep::install_property): Set m_property_rank_map. (cdef_class::cdef_class_rep::get_properties, cdef_class::cdef_class_rep::get_property_map): Change type of properties map. (cdef_class::cdef_class_rep::find_properties, cdef_class::cdef_class_rep::find_properties_aux): Fill properties map in correct order. * ov-classdef.cc: Adapt test for "properties" function with the correct order. (octave_classdef::print_raw, Fproperties): Change type of properties map. * bp-table.cc (user_code_provider::populate_function_cache): Change type of properties map. * scripts/miscellaneous/fieldnames.m, test/classdef/classdef.tst: Adapt test for "properties" function with the correct order.
- Loading branch information
Imad-Eddine Srairi
committed
Jun 10, 2019
1 parent
7e4527a
commit 2a50648
Showing
7 changed files
with
69 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters