summaryrefslogtreecommitdiffstats
path: root/src/main-cmdlineact.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-01-02 09:41:30 +0000
commit169dff19d4da8d76e69b8e896aa25b0013639c03 (patch)
treea0c070fa95188b5cde708ac285e6a2db9df4a83f /src/main-cmdlineact.cpp
parentAvoid creating a new document before opening an old document. (diff)
downloadinkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz
inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip
modernize loops
Diffstat (limited to 'src/main-cmdlineact.cpp')
-rw-r--r--src/main-cmdlineact.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main-cmdlineact.cpp b/src/main-cmdlineact.cpp
index fa050d632..dbe855536 100644
--- a/src/main-cmdlineact.cpp
+++ b/src/main-cmdlineact.cpp
@@ -92,8 +92,7 @@ CmdLineAction::doIt (ActionContext const & context) {
bool
CmdLineAction::doList (ActionContext const & context) {
bool hasActions = !_list.empty();
- for (std::list<CmdLineAction *>::iterator i = _list.begin(); i != _list.end(); ++i) {
- CmdLineAction * entry = *i;
+ for (auto entry : _list) {
entry->doIt(context);
}
return hasActions;
@@ -106,9 +105,7 @@ CmdLineAction::idle () {
// We're going to assume one desktop per document, because no one
// should have had time to make more at this point.
- for (std::list<SPDesktop *>::iterator i = desktops.begin();
- i != desktops.end(); ++i) {
- SPDesktop * desktop = *i;
+ for (auto desktop : desktops) {
//Inkscape::UI::View::View * view = dynamic_cast<Inkscape::UI::View::View *>(desktop);
doList(ActionContext(desktop));
}