summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/text.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-27 16:33:44 +0200
committerNoel Grandin <noel@peralex.com>2015-05-28 12:49:54 +0200
commitd5129a9dd68978f9eccdd4597b5b6834557c422a (patch)
treedf43250172f784f3048ce42ce1c3410d1d449c1e /vcl/source/outdev/text.cxx
parentf3331f7694e74f349375c223ce7ed84838e92d89 (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/outdev/text.cxx')
-rw-r--r--vcl/source/outdev/text.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 5c1749fefda8..15e59bf6cd83 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -689,7 +689,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo,
}
}
#ifdef DBG_UTIL
- for ( sal_uInt16 nL = 0; nL < rLineInfo.Count(); nL++ )
+ for ( sal_Int32 nL = 0; nL < rLineInfo.Count(); nL++ )
{
ImplTextLineInfo* pLine = rLineInfo.GetLine( nL );
OUString aLine = rStr.copy( pLine->GetIndex(), pLine->GetLen() );