diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2018-10-12 20:06:18 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-10-13 15:02:17 +0200 |
commit | 00e10ae3189a4407ffb1a48f836cd52dc9a1b6df (patch) | |
tree | 8da59257ef54f8843b0e12e44591f6e17e9b6d24 /vcl/qt5/Qt5Graphics_GDI.cxx | |
parent | b9234b43ed259a10cf9077032af0f79740f01d8b (diff) |
use range based loops over B2DPolyPolygon in vcl
Change-Id: I98f17311822ba50b0c8eaa50fbdef088c76168d4
Reviewed-on: https://gerrit.libreoffice.org/61730
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/qt5/Qt5Graphics_GDI.cxx')
-rw-r--r-- | vcl/qt5/Qt5Graphics_GDI.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index f8ab00ea1494..91c4c889bc18 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -37,8 +37,7 @@ static void AddPolygonToPath(QPainterPath& rPath, const basegfx::B2DPolygon& rPo bool bClosePath, bool bPixelSnap, bool bLineDraw) { // short circuit if there is nothing to do - const int nPointCount = rPolygon.count(); - if (nPointCount <= 0) + if (rPolygon.count() == 0) return; const bool bHasCurves = rPolygon.areControlPointsUsed(); @@ -105,9 +104,8 @@ static bool AddPolyPolygonToPath(QPainterPath& rPath, const basegfx::B2DPolyPoly const int nPolyCount = rPolyPoly.count(); if (nPolyCount <= 0) return false; - for (int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx) + for (auto const& rPolygon : rPolyPoly) { - const basegfx::B2DPolygon rPolygon = rPolyPoly.getB2DPolygon(nPolyIdx); AddPolygonToPath(rPath, rPolygon, true, bPixelSnap, bLineDraw); } return true; |