summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2018-10-12 20:06:18 +0200
committerJulien Nabet <serval2412@yahoo.fr>2018-10-13 15:02:17 +0200
commit00e10ae3189a4407ffb1a48f836cd52dc9a1b6df (patch)
tree8da59257ef54f8843b0e12e44591f6e17e9b6d24 /vcl/quartz
parentb9234b43ed259a10cf9077032af0f79740f01d8b (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/quartz')
-rw-r--r--vcl/quartz/salgdicommon.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index 40ae59121653..65d158f98201 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -135,14 +135,12 @@ static void AddPolyPolygonToPath( CGMutablePathRef xPath,
bool bPixelSnap, bool bLineDraw )
{
// short circuit if there is nothing to do
- const int nPolyCount = rPolyPoly.count();
- if( nPolyCount <= 0 )
+ if( rPolyPoly.count() == 0 )
{
return;
}
- for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx )
+ for(auto const& rPolygon : rPolyPoly)
{
- const basegfx::B2DPolygon rPolygon = rPolyPoly.getB2DPolygon( nPolyIdx );
AddPolygonToPath( xPath, rPolygon, true, bPixelSnap, bLineDraw );
}
}
@@ -969,8 +967,7 @@ bool AquaSalGraphics::drawPolyPolygon(
double fTransparency)
{
// short circuit if there is nothing to do
- const int nPolyCount = rPolyPolygon.count();
- if( nPolyCount <= 0 )
+ if( rPolyPolygon.count() == 0 )
return true;
// ignore invisible polygons
@@ -984,9 +981,8 @@ bool AquaSalGraphics::drawPolyPolygon(
// setup poly-polygon path
CGMutablePathRef xPath = CGPathCreateMutable();
SAL_INFO( "vcl.cg", "CGPathCreateMutable() = " << xPath );
- for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx )
+ for(auto const& rPolygon : rPolyPolygon)
{
- const basegfx::B2DPolygon rPolygon = rPolyPolygon.getB2DPolygon( nPolyIdx );
AddPolygonToPath( xPath, rPolygon, true, !getAntiAliasB2DDraw(), IsPenVisible() );
}