summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/unit-menu.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2013-10-05 03:54:43 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2013-10-05 03:54:43 +0000
commit706294ff1fa82c86089221d8ee4a0d5bd032925a (patch)
tree4f57389a922f2cb3fdcec99cb21599580e954867 /src/ui/widget/unit-menu.cpp
parentC++ (diff)
downloadinkscape-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.cpp8
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));