diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-27 16:33:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-28 12:49:54 +0200 |
commit | d5129a9dd68978f9eccdd4597b5b6834557c422a (patch) | |
tree | df43250172f784f3048ce42ce1c3410d1d449c1e /basegfx/source/polygon/b2dpolypolygoncutter.cxx | |
parent | f3331f7694e74f349375c223ce7ed84838e92d89 (diff) |
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
Diffstat (limited to 'basegfx/source/polygon/b2dpolypolygoncutter.cxx')
-rw-r--r-- | basegfx/source/polygon/b2dpolypolygoncutter.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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()) { |