From b4b7703e4335460cf48bfd6440f116359994c8ff Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Oct 2015 02:51:05 +0200 Subject: cppcheck:variableScope Change-Id: I9b671637fbe0f32e695d22b74bfb40a39a9fe884 Reviewed-on: https://gerrit.libreoffice.org/19364 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- vcl/source/outdev/textline.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'vcl/source/outdev') diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index f83e28375b1d..19a2fac70aea 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -125,8 +125,6 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY, long nDiffY = nHeight-1; long nCount = nWidth; long nOffY = -1; - long nFreq; - long i; long nPixWidth; long nPixHeight; bool bDrawPixAsRect; @@ -167,10 +165,10 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY, else { nCurY += nDiffY; - nFreq = nCount / (nDiffX+nDiffY); + long nFreq = nCount / (nDiffX+nDiffY); while ( nFreq-- ) { - for( i = nDiffY; i; --i ) + for( long i = nDiffY; i; --i ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, mpGraphics, this, @@ -178,7 +176,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY, nCurX++; nCurY += nOffY; } - for( i = nDiffX; i; --i ) + for( long i = nDiffX; i; --i ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, mpGraphics, this, @@ -190,7 +188,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY, nFreq = nCount % (nDiffX+nDiffY); if ( nFreq ) { - for( i = nDiffY; i && nFreq; --i, --nFreq ) + for( long i = nDiffY; i && nFreq; --i, --nFreq ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, mpGraphics, this, @@ -199,7 +197,7 @@ void OutputDevice::ImplDrawWaveLine( long nBaseX, long nBaseY, nCurY += nOffY; } - for( i = nDiffX; i && nFreq; --i, --nFreq ) + for( long i = nDiffX; i && nFreq; --i, --nFreq ) { ImplDrawWavePixel( nBaseX, nBaseY, nCurX, nCurY, nOrientation, mpGraphics, this, -- cgit v1.2.1