summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2014-05-24 16:55:15 +0200
committerThomas Arnhold <thomas@arnhold.org>2014-05-24 21:20:18 +0200
commitc2518d1ffb1d8eafa3385e4c9451a56584806b16 (patch)
tree98ca75ee8ef9bce572c071b18712b69ca3e35249
parent66e4c16f138e0b1c2c0f06613f6f23d834104343 (diff)
cppcheck: variableScope
Change-Id: I36c0d491bc27ff93c13b1c497e450646d7151df4
-rw-r--r--vcl/source/gdi/bitmap.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index dbdc6d2e400a..52af3eb5d480 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -724,8 +724,6 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
long nY;
long nRotX;
long nRotY;
- long nSinY;
- long nCosY;
boost::scoped_array<long> pCosX(new long[ nNewWidth ]);
boost::scoped_array<long> pSinX(new long[ nNewWidth ]);
boost::scoped_array<long> pCosY(new long[ nNewHeight ]);
@@ -749,8 +747,8 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
for( nY = 0L; nY < nNewHeight; nY++ )
{
- nSinY = pSinY[ nY ];
- nCosY = pCosY[ nY ];
+ long nSinY = pSinY[ nY ];
+ long nCosY = pCosY[ nY ];
for( nX = 0L; nX < nNewWidth; nX++ )
{
@@ -869,13 +867,12 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst,
{
const long nSrcCount = pDstAcc->GetPaletteEntryCount();
const long nDstCount = 1 << nDstBitCount;
- bool bFound;
for( long i = 0L; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); i++ )
{
const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( (sal_uInt16) i );
- bFound = false;
+ bool bFound = false;
for( long j = 0L; j < nDstCount; j++ )
{