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/tool/node.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ui/tool/node.cpp') diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index 4321963b9..78c359609 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -381,8 +381,8 @@ void Handle::dragged(Geom::Point &new_pos, GdkEventMotion *event) //if the snap adjustment is activated and it is not bspline if (snap && !_pm()._isBSpline()) { ControlPointSelection::Set &nodes = _parent->_selection.allPoints(); - for (ControlPointSelection::Set::iterator i = nodes.begin(); i != nodes.end(); ++i) { - Node *n = static_cast(*i); + for (auto node : nodes) { + Node *n = static_cast(node); unselected.push_back(n->snapCandidatePoint()); } sm.setupIgnoreSelection(_desktop, true, &unselected); @@ -1225,9 +1225,9 @@ void Node::dragged(Geom::Point &new_pos, GdkEventMotion *event) // Build the list of unselected nodes. typedef ControlPointSelection::Set Set; Set &nodes = _selection.allPoints(); - for (Set::iterator i = nodes.begin(); i != nodes.end(); ++i) { - if (!(*i)->selected()) { - Node *n = static_cast(*i); + for (auto node : nodes) { + if (!node->selected()) { + Node *n = static_cast(node); Inkscape::SnapCandidatePoint p(n->position(), n->_snapSourceType(), n->_snapTargetType()); unselected.push_back(p); } -- cgit v1.2.3