summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-02-24 16:27:42 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-02-24 17:28:43 +0100
commit3ceb01afc3e5f47930e24fb0b21e6e85b86f660e (patch)
treeb0f28ccf328460ae5f189d6855f55f9815dce39a /basegfx
parent85643ad3b66ee057a6d620d6284a2b1b19de8dc8 (diff)
Use for range loops in basegfx and basic
Change-Id: I5b2086c245695aeb30630150b3c5ccf61fbd6a56 Reviewed-on: https://gerrit.libreoffice.org/50280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dpolygon.cxx7
-rw-r--r--basegfx/source/polygon/b2dpolygontriangulator.cxx6
-rw-r--r--basegfx/source/polygon/b3dpolygon.cxx19
3 files changed, 10 insertions, 22 deletions
diff --git a/basegfx/source/polygon/b2dpolygon.cxx b/basegfx/source/polygon/b2dpolygon.cxx
index 601f493c27b4..1a4d4a76da0c 100644
--- a/basegfx/source/polygon/b2dpolygon.cxx
+++ b/basegfx/source/polygon/b2dpolygon.cxx
@@ -186,12 +186,9 @@ public:
void transform(const basegfx::B2DHomMatrix& rMatrix)
{
- CoordinateData2DVector::iterator aStart(maVector.begin());
- CoordinateData2DVector::iterator aEnd(maVector.end());
-
- for(; aStart != aEnd; ++aStart)
+ for (auto & elem : maVector)
{
- aStart->transform(rMatrix);
+ elem.transform(rMatrix);
}
}
};
diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx
index ed36a83b9a39..a2c740f91798 100644
--- a/basegfx/source/polygon/b2dpolygontriangulator.cxx
+++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx
@@ -367,11 +367,9 @@ namespace basegfx
Triangulator::~Triangulator()
{
- EdgeEntryPointers::iterator aIter(maNewEdgeEntries.begin());
-
- while(aIter != maNewEdgeEntries.end())
+ for (auto const& newEdgeEntry : maNewEdgeEntries)
{
- delete *aIter++;
+ delete newEdgeEntry;
}
}
diff --git a/basegfx/source/polygon/b3dpolygon.cxx b/basegfx/source/polygon/b3dpolygon.cxx
index 0a78614f4320..fc0ef2c23f22 100644
--- a/basegfx/source/polygon/b3dpolygon.cxx
+++ b/basegfx/source/polygon/b3dpolygon.cxx
@@ -226,12 +226,9 @@ public:
void transform(const ::basegfx::B3DHomMatrix& rMatrix)
{
- CoordinateData3DVector::iterator aStart(maVector.begin());
- CoordinateData3DVector::iterator aEnd(maVector.end());
-
- for(; aStart != aEnd; ++aStart)
+ for (auto & elem : maVector)
{
- aStart->transform(rMatrix);
+ elem.transform(rMatrix);
}
}
};
@@ -532,11 +529,9 @@ public:
void transform(const basegfx::B3DHomMatrix& rMatrix)
{
- const NormalsData3DVector::const_iterator aEnd(maVector.end());
-
- for(NormalsData3DVector::iterator aStart(maVector.begin()); aStart != aEnd; ++aStart)
+ for (auto & elem : maVector)
{
- (*aStart) *= rMatrix;
+ elem *= rMatrix;
}
}
};
@@ -689,11 +684,9 @@ public:
void transform(const ::basegfx::B2DHomMatrix& rMatrix)
{
- const TextureData2DVector::const_iterator aEnd(maVector.end());
-
- for(TextureData2DVector::iterator aStart(maVector.begin()); aStart != aEnd; ++aStart)
+ for (auto & elem : maVector)
{
- (*aStart) *= rMatrix;
+ elem *= rMatrix;
}
}
};