summaryrefslogtreecommitdiff
path: root/vcl/opengl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-12 10:06:27 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-13 08:09:28 +0000
commitf12b17867ef8fa2cfc2ddb7ecda9d7acc57cfa59 (patch)
tree3b0a89e34cfca550b38b92423a1de4b805d2c91c /vcl/opengl
parent96fab0513215cc416e96e1b2089466afd0d2791c (diff)
clang-tidy modernize-loop-convert in vcl
Change-Id: I79e97a4826bfe3918de223cccf48646a1404f901 Reviewed-on: https://gerrit.libreoffice.org/24922 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r--vcl/opengl/gdiimpl.cxx26
-rw-r--r--vcl/opengl/salbmp.cxx6
2 files changed, 16 insertions, 16 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 2edeaaa5c17f..904834472a51 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1335,8 +1335,8 @@ void OpenGLSalGraphicsImpl::DrawPolyPolygon( const basegfx::B2DPolyPolygon& rPol
// draw tesselation result
if( aB2DTrapVector.size())
{
- for( size_t i = 0; i < aB2DTrapVector.size(); ++i )
- DrawTrapezoid( aB2DTrapVector[ i ], blockAA );
+ for(basegfx::B2DTrapezoid & i : aB2DTrapVector)
+ DrawTrapezoid( i, blockAA );
}
}
@@ -1355,16 +1355,16 @@ void OpenGLSalGraphicsImpl::DrawRegionBand( const RegionBand& rRegion )
aVertices.push_back(GLfloat(pt.X())); \
aVertices.push_back(GLfloat(pt.Y()));
- for( size_t i = 0; i < aRects.size(); ++i )
+ for(Rectangle & rRect : aRects)
{
- aRects[i].Bottom() += 1;
- aRects[i].Right() += 1;
- ADD_VERTICE( aRects[i].TopLeft() );
- ADD_VERTICE( aRects[i].TopRight() );
- ADD_VERTICE( aRects[i].BottomLeft() );
- ADD_VERTICE( aRects[i].BottomLeft() );
- ADD_VERTICE( aRects[i].TopRight() );
- ADD_VERTICE( aRects[i].BottomRight() );
+ rRect.Bottom() += 1;
+ rRect.Right() += 1;
+ ADD_VERTICE( rRect.TopLeft() );
+ ADD_VERTICE( rRect.TopRight() );
+ ADD_VERTICE( rRect.BottomLeft() );
+ ADD_VERTICE( rRect.BottomLeft() );
+ ADD_VERTICE( rRect.TopRight() );
+ ADD_VERTICE( rRect.BottomRight() );
}
#undef ADD_VERTICE
@@ -2033,8 +2033,8 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygon( const basegfx::B2DPolyPolygon& rPol
{
basegfx::B2DTrapezoidVector aB2DTrapVector;
basegfx::tools::createLineTrapezoidFromB2DPolyPolygon( aB2DTrapVector, rPolyPolygon );
- for( size_t i = 0; i < aB2DTrapVector.size(); ++i )
- DrawTrapezoid( aB2DTrapVector[ i ] );
+ for(basegfx::B2DTrapezoid & i : aB2DTrapVector)
+ DrawTrapezoid( i );
}
PostDraw();
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index b9b7a5f0b457..e317004c9470 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -402,11 +402,11 @@ void lclInstantiateTexture(OpenGLTexture& rTexture, const int nWidth, const int
sTextureAtlases.push_back(std::unique_ptr<FixedTextureAtlasManager>(new FixedTextureAtlasManager(8, 8, 48)));
sTextureAtlases.push_back(std::unique_ptr<FixedTextureAtlasManager>(new FixedTextureAtlasManager(8, 8, 64)));
}
- for (size_t i = 0; i < sTextureAtlases.size(); i++)
+ for (std::unique_ptr<FixedTextureAtlasManager> & pTextureAtlas : sTextureAtlases)
{
- if (nWidth == sTextureAtlases[i]->GetSubtextureSize())
+ if (nWidth == pTextureAtlas->GetSubtextureSize())
{
- rTexture = sTextureAtlases[i]->InsertBuffer(nWidth, nHeight, nFormat, nType, pData);
+ rTexture = pTextureAtlas->InsertBuffer(nWidth, nHeight, nFormat, nType, pData);
return;
}
}