From 9921bae92ebfe1f1372fb4158a51a6f70ea738bd Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 9 Jan 2016 20:46:39 +0000 Subject: cppcheck: truncLongCastAssignment Change-Id: I55f684c0afb8b0d4ab4b749084a3ab7b66201bda --- vcl/source/gdi/bitmap.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 6b675edc4f5e..d0f266626256 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -809,7 +809,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, if( nSrcBitCount > nDstBitCount ) { - long nNextIndex = 0L; + int nNextIndex = 0; if( ( nSrcBitCount == 24 ) && ( nDstBitCount < 24 ) ) Convert( BMP_CONVERSION_24BIT ); @@ -831,16 +831,16 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, if( pSrcAcc && pDstAcc ) { - const long nSrcCount = pDstAcc->GetPaletteEntryCount(); - const long nDstCount = 1 << nDstBitCount; + const int nSrcCount = pDstAcc->GetPaletteEntryCount(); + const int nDstCount = 1 << nDstBitCount; - for( long i = 0L; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); i++ ) + for (int i = 0; ( i < nSrcCount ) && ( nNextIndex < nSrcCount ); ++i) { const BitmapColor& rSrcCol = pSrcAcc->GetPaletteColor( (sal_uInt16) i ); bool bFound = false; - for( long j = 0L; j < nDstCount; j++ ) + for (int j = 0; j < nDstCount; ++j) { if( rSrcCol == pDstAcc->GetPaletteColor( (sal_uInt16) j ) ) { -- cgit