summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive3d
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-25 10:56:28 +0200
committerNoel Grandin <noel@peralex.com>2016-04-25 11:57:07 +0200
commita5810faae384f7f73e8e835c1f536785a60881d2 (patch)
tree32586f5af184c764d103e64c3c31b366f421c832 /drawinglayer/source/primitive3d
parentcafc53f8b4c08443524b1da6f4918d49afd45bb5 (diff)
clang-tidy modernize-loop-convert in d*
Change-Id: I0830a41b48e884ef63d32b5873c7007195659bb9
Diffstat (limited to 'drawinglayer/source/primitive3d')
-rw-r--r--drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx3
-rw-r--r--drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx16
-rw-r--r--drawinglayer/source/primitive3d/sdrprimitive3d.cxx4
3 files changed, 11 insertions, 12 deletions
diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
index ae60358e065d..489680a223ac 100644
--- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
@@ -181,9 +181,8 @@ namespace drawinglayer
a2DUnitLine.append(basegfx::B2DPoint(0.0, 0.0));
a2DUnitLine.append(basegfx::B2DPoint(1.0, 0.0));
- for(size_t c(0); c < aMatrices.size(); c++)
+ for(basegfx::B2DHomMatrix & rMatrix : aMatrices)
{
- const basegfx::B2DHomMatrix& rMatrix = aMatrices[c];
basegfx::B2DPolygon aNewLine(a2DUnitLine);
aNewLine.transform(rMatrix);
a2DHatchLines.append(aNewLine);
diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
index c75c4fa487c6..bf593985b94b 100644
--- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx
@@ -49,9 +49,9 @@ namespace drawinglayer
{
basegfx::B3DRange aRetval;
- for(size_t a(0); a < rFill.size(); a++)
+ for(basegfx::B3DPolyPolygon & a : rFill)
{
- aRetval.expand(basegfx::tools::getRange(rFill[a]));
+ aRetval.expand(basegfx::tools::getRange(a));
}
return aRetval;
@@ -62,26 +62,26 @@ namespace drawinglayer
// create sphere normals
const basegfx::B3DPoint aCenter(rRange.getCenter());
- for(size_t a(0); a < rFill.size(); a++)
+ for(basegfx::B3DPolyPolygon & a : rFill)
{
- rFill[a] = basegfx::tools::applyDefaultNormalsSphere(rFill[a], aCenter);
+ a = basegfx::tools::applyDefaultNormalsSphere(a, aCenter);
}
}
void applyNormalsKindFlatTo3DGeometry(::std::vector< basegfx::B3DPolyPolygon >& rFill)
{
- for(size_t a(0); a < rFill.size(); a++)
+ for(basegfx::B3DPolyPolygon & a : rFill)
{
- rFill[a].clearNormals();
+ a.clearNormals();
}
}
void applyNormalsInvertTo3DGeometry(::std::vector< basegfx::B3DPolyPolygon >& rFill)
{
// invert normals
- for(size_t a(0); a < rFill.size(); a++)
+ for(basegfx::B3DPolyPolygon & a : rFill)
{
- rFill[a] = basegfx::tools::invertNormals(rFill[a]);
+ a = basegfx::tools::invertNormals(a);
}
}
diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx
index 0778f8782014..298b58410041 100644
--- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx
@@ -55,9 +55,9 @@ namespace drawinglayer
if(!rSlices.empty())
{
- for(size_t a(0); a < rSlices.size(); a++)
+ for(const auto & rSlice : rSlices)
{
- aRetval.expand(basegfx::tools::getRange(rSlices[a].getB3DPolyPolygon()));
+ aRetval.expand(basegfx::tools::getRange(rSlice.getB3DPolyPolygon()));
}
aRetval.transform(getTransform());