diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2013-10-05 03:54:43 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2013-10-05 03:54:43 +0000 |
| commit | 706294ff1fa82c86089221d8ee4a0d5bd032925a (patch) | |
| tree | 4f57389a922f2cb3fdcec99cb21599580e954867 /src/ui/widget/unit-menu.cpp | |
| parent | C++ (diff) | |
| download | inkscape-706294ff1fa82c86089221d8ee4a0d5bd032925a.tar.gz inkscape-706294ff1fa82c86089221d8ee4a0d5bd032925a.zip | |
Rewrite the internals of the unit code for somewhat better performance
(bzr r12661)
Diffstat (limited to 'src/ui/widget/unit-menu.cpp')
| -rw-r--r-- | src/ui/widget/unit-menu.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/widget/unit-menu.cpp b/src/ui/widget/unit-menu.cpp index 111226774..684016471 100644 --- a/src/ui/widget/unit-menu.cpp +++ b/src/ui/widget/unit-menu.cpp @@ -33,11 +33,9 @@ bool UnitMenu::setUnitType(UnitType unit_type) { // Expand the unit widget with unit entries from the unit table UnitTable::UnitMap m = unit_table.units(unit_type); - UnitTable::UnitMap::iterator iter = m.begin(); - while(iter != m.end()) { - Glib::ustring text = (*iter).first; - append(text); - ++iter; + + for (UnitTable::UnitMap::iterator i = m.begin(); i != m.end(); ++i) { + append(i->first); } _type = unit_type; set_active_text(unit_table.primary(unit_type)); |
