summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/node.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/ui/tool/node.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/ui/tool/node.cpp')
-rw-r--r--src/ui/tool/node.cpp10
1 files changed, 5 insertions, 5 deletions
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<Node*>(*i);
+ for (auto node : nodes) {
+ Node *n = static_cast<Node*>(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<Node*>(*i);
+ for (auto node : nodes) {
+ if (!node->selected()) {
+ Node *n = static_cast<Node*>(node);
Inkscape::SnapCandidatePoint p(n->position(), n->_snapSourceType(), n->_snapTargetType());
unselected.push_back(p);
}