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/selection.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/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 09d212b76..4a5ccf60b 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -217,8 +217,8 @@ Selection::setBackup () if(tool){ Inkscape::UI::ControlPointSelection *cps = tool->_selected_nodes; std::list<Inkscape::UI::SelectableControlPoint *> points_list = cps->_points_list; - for (std::list<Inkscape::UI::SelectableControlPoint *>::iterator i = points_list.begin(); i != points_list.end(); ++i) { - Inkscape::UI::Node *node = dynamic_cast<Inkscape::UI::Node*>(*i); + for (auto & i : points_list) { + Inkscape::UI::Node *node = dynamic_cast<Inkscape::UI::Node*>(i); if (node) { std::string id = node->nodeList().subpathList().pm().item()->getId(); @@ -282,14 +282,14 @@ Selection::restoreBackup() Inkscape::UI::Node * node = dynamic_cast<Inkscape::UI::Node*>(*points_list.begin()); if (node) { Inkscape::UI::SubpathList sp = node->nodeList().subpathList(); - for (std::vector<std::pair<std::string, std::pair<int, int> > >::iterator l = _seldata.begin(); l != _seldata.end(); ++l) { - SPPath * path = dynamic_cast<SPPath *>(document->getObjectById(l->first)); + for (auto & l : _seldata) { + SPPath * path = dynamic_cast<SPPath *>(document->getObjectById(l.first)); gint sp_count = 0; for (Inkscape::UI::SubpathList::iterator j = sp.begin(); j != sp.end(); ++j, ++sp_count) { - if(sp_count == l->second.first) { + if(sp_count == l.second.first) { gint nt_count = 0; for (Inkscape::UI::NodeList::iterator k = (*j)->begin(); k != (*j)->end(); ++k, ++nt_count) { - if(nt_count == l->second.second) { + if(nt_count == l.second.second) { cps->insert(k.ptr()); break; } |
