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/widgets/toolbox.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/widgets/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<Gtk::Widget*> proxies = get_proxies(); - for ( Glib::SListHandle<Gtk::Widget*>::iterator it = proxies.begin(); it != proxies.end(); ++it ) { - Gtk::ToolItem* ti = dynamic_cast<Gtk::ToolItem*>(*it); + for (auto proxie : proxies) { + Gtk::ToolItem* ti = dynamic_cast<Gtk::ToolItem*>(proxie); if (ti) { // *should* have one child that is the Inkscape::UI::Widget::Button auto child = dynamic_cast<Inkscape::UI::Widget::Button *>(ti->get_child()); @@ -607,8 +607,8 @@ static Glib::RefPtr<Gtk::ActionGroup> 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 ); |
