summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-21 10:26:48 +0200
committerNoel Grandin <noel@peralex.com>2016-04-21 10:27:17 +0200
commit8762aa986dbca42e61cc8fb1b2c1d2ca66bcfcbe (patch)
treeaf1f197feb0a40e819cc4ed74efce934935c9cae /basegfx
parentb19ac3c4c6b4a41a1f3acac68b299fd676428a87 (diff)
clang-tidy modernize-loop-convert in b*
Change-Id: I8ac6eb59e213eafa78e3dc4578738b53e8adef5b
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygonclipper.cxx4
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx3
-rw-r--r--basegfx/source/polygon/b2dpolypolygon.cxx4
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx4
-rw-r--r--basegfx/source/polygon/b2dtrapezoid.cxx3
5 files changed, 8 insertions, 10 deletions
diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx
index d8123edcd881..7b4916993c0b 100644
--- a/basegfx/source/polygon/b2dpolygonclipper.cxx
+++ b/basegfx/source/polygon/b2dpolygonclipper.cxx
@@ -828,8 +828,8 @@ namespace basegfx
else
{
// the last triangle has not been altered, simply copy to result
- for(sal_uInt32 i=0; i<3; ++i)
- aResult.append(stack[i]);
+ for(basegfx::B2DPoint & i : stack)
+ aResult.append(i);
}
}
}
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index e72c6ba6b7e5..22ee49622b78 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -412,9 +412,8 @@ namespace basegfx
}
// append remapped tempVector entries for edge to tempPoints for edge
- for(size_t a(0); a < aTempPointVectorEdge.size(); a++)
+ for(temporaryPoint & rTempPoint : aTempPointVectorEdge)
{
- const temporaryPoint& rTempPoint = aTempPointVectorEdge[a];
rTempPointsB.push_back(temporaryPoint(rTempPoint.getPoint(), nIndB, rTempPoint.getCut()));
}
}
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx
index f58dceca6c7a..2f7106608f50 100644
--- a/basegfx/source/polygon/b2dpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dpolypolygon.cxx
@@ -105,9 +105,9 @@ public:
void setClosed(bool bNew)
{
- for(size_t a(0); a < maPolygons.size(); a++)
+ for(basegfx::B2DPolygon & maPolygon : maPolygons)
{
- maPolygons[a].setClosed(bNew);
+ maPolygon.setClosed(bNew);
}
}
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index 3332976e9768..e7bf5a0ba246 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -1038,9 +1038,9 @@ namespace basegfx
B2DPolyPolygonVector aResult;
aResult.reserve(aInput.size());
- for(size_t a(0); a < aInput.size(); a++)
+ for(basegfx::B2DPolyPolygon & a : aInput)
{
- const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(aInput[a]));
+ const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(a));
if(!aResult.empty())
{
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index e36d2af4930d..f25b7bfb884e 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -423,10 +423,9 @@ namespace basegfx
// there were horizontal edges. These can be excluded, but
// cuts with other edges need to be solved and added before
// ignoring them
- for(size_t a = 0; a < rTrDeSimpleEdges.size(); a++)
+ for(TrDeSimpleEdge & rHorEdge : rTrDeSimpleEdges)
{
// get horizontal edge as candidate; prepare its range and fixed Y
- const TrDeSimpleEdge& rHorEdge = rTrDeSimpleEdges[a];
const B1DRange aRange(rHorEdge.getStart().getX(), rHorEdge.getEnd().getX());
const double fFixedY(rHorEdge.getStart().getY());