summaryrefslogtreecommitdiffstats
path: root/basegfx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-17 20:16:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-18 08:54:36 +0200
commitf46740abc225f5b4c7f604bf3ef32c503c7fc858 (patch)
tree59942cedf60d33464df43305b550247d2e000edd /basegfx
parentSimplify SdrTextObj::RecalcSnapRect (diff)
downloadcore-f46740abc225f5b4c7f604bf3ef32c503c7fc858.tar.gz
core-f46740abc225f5b4c7f604bf3ef32c503c7fc858.zip
loplugin:sequenceloop also check for B2DPolyPolygon
which has the same problem Change-Id: I98f9924626f26739e91d6a9d21e4276473ea314d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dtrapezoid.cxx6
-rw-r--r--basegfx/test/boxclipper.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
index f30001f52d2a..3a255c18a7a3 100644
--- a/basegfx/source/polygon/b2dtrapezoid.cxx
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -496,7 +496,7 @@ namespace basegfx::trapezoidhelper
aSource = aSource.getDefaultAdaptiveSubdivision();
}
- for(const auto& aPolygonCandidate : aSource)
+ for(const auto& aPolygonCandidate : std::as_const(aSource))
{
// 1st run: count points
const sal_uInt32 nCount(aPolygonCandidate.count());
@@ -513,7 +513,7 @@ namespace basegfx::trapezoidhelper
// after 2nd loop since pointers to it are used in the edges
maPoints.reserve(nAllPointCount);
- for(const auto& aPolygonCandidate : aSource)
+ for(const auto& aPolygonCandidate : std::as_const(aSource))
{
// 2nd run: add points
const sal_uInt32 nCount(aPolygonCandidate.count());
@@ -533,7 +533,7 @@ namespace basegfx::trapezoidhelper
// in the edges may be wrong. Security first here.
sal_uInt32 nStartIndex(0);
- for(const auto& aPolygonCandidate : aSource)
+ for(const auto& aPolygonCandidate : std::as_const(aSource))
{
const sal_uInt32 nCount(aPolygonCandidate.count());
diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx
index 8aaa45be9fbc..b65f25bae425 100644
--- a/basegfx/test/boxclipper.cxx
+++ b/basegfx/test/boxclipper.cxx
@@ -158,7 +158,7 @@ public:
static constexpr OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
B2DPolyPolygon randomPoly;
CPPUNIT_ASSERT(utils::importFromSvgD(randomPoly, randomSvg, false, nullptr));
- for (auto const& aPolygon : randomPoly)
+ for (auto const& aPolygon : std::as_const(randomPoly))
aRandomIntersections.appendElement(aPolygon.getB2DRange(), B2VectorOrientation::Negative);
#endif
}