From e1af7f0c438bc242e4562aa0286c99787b5ad544 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 21 Apr 2016 11:03:55 +0200 Subject: clang-tidy modernize-loop-convert in c* Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf --- canvas/source/cairo/cairo_textlayout.cxx | 6 +++--- canvas/source/opengl/ogl_canvastools.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'canvas') 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