diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-21 11:03:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-04-21 11:03:55 +0200 |
commit | e1af7f0c438bc242e4562aa0286c99787b5ad544 (patch) | |
tree | 29c7faa3556f33baa7eae5cd0aca3946afb8a560 /canvas | |
parent | 8762aa986dbca42e61cc8fb1b2c1d2ca66bcfcbe (diff) |
clang-tidy modernize-loop-convert in c*
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/cairo/cairo_textlayout.cxx | 6 | ||||
-rw-r--r-- | canvas/source/opengl/ogl_canvastools.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx index c787f02a9510..fa3d5b11295e 100644 --- a/canvas/source/cairo/cairo_textlayout.cxx +++ b/canvas/source/cairo/cairo_textlayout.cxx @@ -512,10 +512,10 @@ namespace cairocanvas // loop to draw the text for every half pixel of displacement for (int nSteps = 0; nSteps < total_steps; nSteps++) { - for(int nGlyphIdx = 0; nGlyphIdx < (int) cairo_glyphs.size(); nGlyphIdx++) + for(cairo_glyph_t & cairo_glyph : cairo_glyphs) { - cairo_glyphs[nGlyphIdx].x += (bold_dx * nSteps / total_steps) / 4; - cairo_glyphs[nGlyphIdx].y -= (bold_dx * nSteps / total_steps) / 4; + cairo_glyph.x += (bold_dx * nSteps / total_steps) / 4; + cairo_glyph.y -= (bold_dx * nSteps / total_steps) / 4; } cairo_show_glyphs(pSCairo.get(), &cairo_glyphs[0], cairo_glyphs.size()); } diff --git a/canvas/source/opengl/ogl_canvastools.cxx b/canvas/source/opengl/ogl_canvastools.cxx index 1a37c69f4032..657a22027ba7 100644 --- a/canvas/source/opengl/ogl_canvastools.cxx +++ b/canvas/source/opengl/ogl_canvastools.cxx @@ -113,14 +113,14 @@ namespace oglcanvas aScaleShear.shearX(-0.1); aScaleShear.scale(scale,scale); - for( size_t i=0; i<rNumbers.size(); ++i ) + for(double rNumber : rNumbers) { aTmp.identity(); aTmp.translate(0,y); y += 1.2*scale; basegfx::B2DPolyPolygon aPoly= - basegfx::tools::number2PolyPolygon(rNumbers[i],10,3); + basegfx::tools::number2PolyPolygon(rNumber,10,3); aTmp=aTmp*aScaleShear; aPoly.transform(aTmp); |