diff options
author | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-09-29 17:57:49 +0200 |
---|---|---|
committer | Pierre-André Jacquod <pjacquod@alumni.ethz.ch> | 2011-10-07 15:57:32 +0200 |
commit | 394e13ea948355cc8ac73df2a636665b0296e08d (patch) | |
tree | 5113a63e9be9770d177e0a4e7811d2c5e56cded5 | |
parent | e0f9a3411a7670aff27afed46ebfa18772cdb95f (diff) |
cppcheck scope reduction of var in vcl/... bitmap.cxx
-rw-r--r-- | vcl/source/gdi/bitmap.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 46be1f542e3b..417ebf796f29 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -1193,7 +1193,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const if( !nTol ) { const BitmapColor aTest( pReadAcc->GetBestMatchingColor( rTransColor ) ); - long nX, nY, nShift; + long nX, nY; if( pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_MSN_PAL || pReadAcc->GetScanlineFormat() == BMP_FORMAT_4BIT_LSN_PAL ) @@ -1210,6 +1210,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const { Scanline pSrc = pReadAcc->GetScanline( nY ); Scanline pDst = pWriteAcc->GetScanline( nY ); + long nShift = 0; for( nX = 0L, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 ) { if( cTest == ( ( pSrc[ nX >> 1 ] >> nShift ) & 0x0f ) ) @@ -1224,6 +1225,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const for( nY = 0L; nY < nHeight; nY++ ) { Scanline pSrc = pReadAcc->GetScanline( nY ); + long nShift = 0; for( nX = 0L, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 ) { if( cTest == ( ( pSrc[ nX >> 1 ] >> nShift ) & 0x0f ) ) |