summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2020-12-17 05:34:37 +1100
committerMike Kaganski <mike.kaganski@collabora.com>2020-12-18 11:48:13 +0100
commit3f28fd9a4093de421ea92ddcf7e8cda65f65a3f0 (patch)
treec86d92b441b9bf97737a78971d0afe62ff03aeae /vcl
parent73dc3bdf58d80bf22477cdf95bf46d6acbc20f80 (diff)
vcl: move nShift closer into scope where it is used
Change-Id: If85e013269b39e1d8d34653a1348d080d34eba99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107851 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/bitmap3.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index a2c50583a2b4..e037c0c38c99 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -343,7 +343,6 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
if( pReadAcc )
{
const BitmapPalette& rPal = GetGreyPalette( nGreys );
- sal_uLong nShift = ( ( nGreys == 16 ) ? 4UL : 0UL );
bool bPalDiffers = !pReadAcc->HasPalette() || ( rPal.GetEntryCount() != pReadAcc->GetPaletteEntryCount() );
if( !bPalDiffers )
@@ -359,6 +358,8 @@ bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys )
const tools::Long nWidth = pWriteAcc->Width();
const tools::Long nHeight = pWriteAcc->Height();
+ sal_uLong nShift = ((nGreys == 16) ? 4UL : 0UL);
+
if( pReadAcc->HasPalette() )
{
for( tools::Long nY = 0; nY < nHeight; nY++ )