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/snapped-curve.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/snapped-curve.cpp') diff --git a/src/snapped-curve.cpp b/src/snapped-curve.cpp index f63541582..2d58ddb34 100644 --- a/src/snapped-curve.cpp +++ b/src/snapped-curve.cpp @@ -220,12 +220,12 @@ bool getClosestIntersectionCL(std::list const &curve_lis { bool success = false; - for (std::list::const_iterator i = curve_list.begin(); i != curve_list.end(); ++i) { - if ((*i).getTarget() != Inkscape::SNAPTARGET_BBOX_EDGE) { // We don't support snapping to intersections of bboxes, + for (const auto & i : curve_list) { + if (i.getTarget() != Inkscape::SNAPTARGET_BBOX_EDGE) { // We don't support snapping to intersections of bboxes, // as this would require two bboxes two be flashed in the snap indicator - for (std::list::const_iterator j = line_list.begin(); j != line_list.end(); ++j) { - if ((*j).getTarget() != Inkscape::SNAPTARGET_BBOX_EDGE) { // We don't support snapping to intersections of bboxes - Inkscape::SnappedPoint sp = (*i).intersect(*j, p, dt2doc); + for (const auto & j : line_list) { + if (j.getTarget() != Inkscape::SNAPTARGET_BBOX_EDGE) { // We don't support snapping to intersections of bboxes + Inkscape::SnappedPoint sp = i.intersect(j, p, dt2doc); if (sp.getAtIntersection()) { // if it's the first point bool const c1 = !success; -- cgit v1.2.3