diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/util/units.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'src/util/units.cpp')
| -rw-r--r-- | src/util/units.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/units.cpp b/src/util/units.cpp index 8c0be134d..0a1fdbf31 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -267,9 +267,9 @@ UnitTable::UnitTable() UnitTable::~UnitTable() { - for (UnitCodeMap::iterator iter = _unit_map.begin(); iter != _unit_map.end(); ++iter) + for (auto & iter : _unit_map) { - delete iter->second; + delete iter.second; } } @@ -383,9 +383,9 @@ bool UnitTable::hasUnit(Glib::ustring const &unit) const UnitTable::UnitMap UnitTable::units(UnitType type) const { UnitMap submap; - for (UnitCodeMap::const_iterator iter = _unit_map.begin(); iter != _unit_map.end(); ++iter) { - if (iter->second->type == type) { - submap.insert(UnitMap::value_type(iter->second->abbr, *iter->second)); + for (auto iter : _unit_map) { + if (iter.second->type == type) { + submap.insert(UnitMap::value_type(iter.second->abbr, *iter.second)); } } |
