From 8b7036450f46c87f0b6f9ac40ccd69d5a57cac55 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 26 Feb 2017 21:56:36 +0100 Subject: loplugin:loopvartoosmall Change-Id: I085d409f3271c5a4d8237fa3e3c4a74bed296acb --- basegfx/source/polygon/b2dpolypolygoncutter.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'basegfx') diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx index 88cafdedcd39..f2cbf2123c92 100644 --- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx +++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx @@ -1047,16 +1047,17 @@ namespace basegfx const B2DRange aCandidateRange(aCandidate.getB2DRange()); bool bCouldMergeSimple(false); - for(sal_uInt32 b(0); !bCouldMergeSimple && b < aResult.size(); b++) + for(auto & b: aResult) { - basegfx::B2DPolyPolygon aTarget(aResult[b]); + basegfx::B2DPolyPolygon aTarget(b); const B2DRange aTargetRange(aTarget.getB2DRange()); if(!aCandidateRange.overlaps(aTargetRange)) { aTarget.append(aCandidate); - aResult[b] = aTarget; + b = aTarget; bCouldMergeSimple = true; + break; } } -- cgit