From 169dff19d4da8d76e69b8e896aa25b0013639c03 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 10:41:30 +0100 Subject: modernize loops --- src/ui/widget/unit-menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/widget/unit-menu.cpp') diff --git a/src/ui/widget/unit-menu.cpp b/src/ui/widget/unit-menu.cpp index 7be848aac..938851265 100644 --- a/src/ui/widget/unit-menu.cpp +++ b/src/ui/widget/unit-menu.cpp @@ -30,8 +30,8 @@ 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); - for (UnitTable::UnitMap::iterator i = m.begin(); i != m.end(); ++i) { - append(i->first); + for (auto & i : m) { + append(i.first); } _type = unit_type; set_active_text(unit_table.primary(unit_type)); -- cgit v1.2.3