From d5129a9dd68978f9eccdd4597b5b6834557c422a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 27 May 2015 16:33:44 +0200 Subject: new clang plugin: loopvartoosmall Idea from bubli - look for loops where the index variable is of such size that it cannot cover the range revealed by examining the length part of the condition. So far, I have only run the plugin up till the VCL module. Also the plugin deliberately excludes anything more complicated than a straightforward incrementing for loop. Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015 --- basegfx/source/polygon/b2dpolypolygoncutter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'basegfx/source/polygon/b2dpolypolygoncutter.cxx') diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx index 5f1385245fc5..c0d080be18c0 100644 --- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx +++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx @@ -1038,7 +1038,7 @@ namespace basegfx B2DPolyPolygonVector aResult; aResult.reserve(aInput.size()); - for(sal_uInt32 a(0); a < aInput.size(); a++) + for(size_t a(0); a < aInput.size(); a++) { const basegfx::B2DPolyPolygon aCandidate(prepareForPolygonOperation(aInput[a])); @@ -1080,7 +1080,7 @@ namespace basegfx B2DPolyPolygonVector aResult; aResult.reserve((aInput.size() / 2) + 1); - for(sal_uInt32 a(0); a < aInput.size(); a += 2) + for(size_t a(0); a < aInput.size(); a += 2) { if(a + 1 < aInput.size()) { -- cgit