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 /vcl/source/gdi/bitmap.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 'vcl/source/gdi/bitmap.cxx')
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 51e5db80924f..db5c1e9ba7d5 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -1435,7 +1435,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) aSubRect.Top() = nYStart; aSubRect.Bottom() = nY ? nY - 1 : 0; - for(sal_uInt32 a(0); a < aLine.size();) + for(size_t a(0); a < aLine.size();) { aSubRect.Left() = aLine[a++]; aSubRect.Right() = aLine[a++]; @@ -1458,7 +1458,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) aSubRect.Top() = nYStart; aSubRect.Bottom() = nY ? nY - 1 : 0; - for(sal_uInt32 a(0); a < aLine.size();) + for(size_t a(0); a < aLine.size();) { aSubRect.Left() = aLine[a++]; aSubRect.Right() = aLine[a++]; |