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/widgets/toolbox.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets/toolbox.cpp') diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index fe105aea6..ddf395ccd 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -357,8 +357,8 @@ void VerbAction::set_active(bool active) { this->active = active; Glib::SListHandle proxies = get_proxies(); - for ( Glib::SListHandle::iterator it = proxies.begin(); it != proxies.end(); ++it ) { - Gtk::ToolItem* ti = dynamic_cast(*it); + for (auto proxie : proxies) { + Gtk::ToolItem* ti = dynamic_cast(proxie); if (ti) { // *should* have one child that is the Inkscape::UI::Widget::Button auto child = dynamic_cast(ti->get_child()); @@ -607,8 +607,8 @@ static Glib::RefPtr create_or_fetch_actions( SPDesktop* deskto desktop->connectDestroy(&desktopDestructHandler); } - for ( guint i = 0; i < G_N_ELEMENTS(verbsToUse); i++ ) { - Inkscape::Verb* verb = Inkscape::Verb::get(verbsToUse[i]); + for (int i : verbsToUse) { + Inkscape::Verb* verb = Inkscape::Verb::get(i); if ( verb ) { if (!mainActions->get_action(verb->get_id())) { GtkAction* act = create_action_for_verb( verb, view, toolboxSize ); -- cgit v1.2.3