From 988e2827319fa2fe04bb818880c1f381bd08a314 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 Apr 2021 09:33:14 +0200 Subject: loplugin:constantparam Change-Id: I1d518bef47c838d03d8526a6a8fffd36d2ee68d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114074 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/bitmap/bitmap.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vcl/source/bitmap') diff --git a/vcl/source/bitmap/bitmap.cxx b/vcl/source/bitmap/bitmap.cxx index 7bf272225d6c..99b8d10e9ef7 100644 --- a/vcl/source/bitmap/bitmap.cxx +++ b/vcl/source/bitmap/bitmap.cxx @@ -991,7 +991,7 @@ bool Bitmap::Convert( BmpConversion eConversion ) if( nBitCount < 8 ) bRet = ImplConvertUp(vcl::PixelFormat::N8_BPP); else if( nBitCount > 8 ) - bRet = ImplConvertDown(vcl::PixelFormat::N8_BPP); + bRet = ImplConvertDown8BPP(); else bRet = true; } @@ -1004,7 +1004,7 @@ bool Bitmap::Convert( BmpConversion eConversion ) if( nBitCount < 8 ) bRet = ImplConvertUp(vcl::PixelFormat::N8_BPP, &aTrans ); else - bRet = ImplConvertDown(vcl::PixelFormat::N8_BPP, &aTrans ); + bRet = ImplConvertDown8BPP(&aTrans ); } break; @@ -1240,9 +1240,9 @@ bool Bitmap::ImplConvertUp(vcl::PixelFormat ePixelFormat, Color const * pExtColo return bRet; } -bool Bitmap::ImplConvertDown(vcl::PixelFormat ePixelFormat, Color const * pExtColor) +bool Bitmap::ImplConvertDown8BPP(Color const * pExtColor) { - SAL_WARN_IF(ePixelFormat > getPixelFormat(), "vcl", "New pixelformat must be lower ( or equal when pExtColor is set )!"); + SAL_WARN_IF(vcl::PixelFormat::N8_BPP > getPixelFormat(), "vcl", "New pixelformat must be lower ( or equal when pExtColor is set )!"); Bitmap::ScopedReadAccess pReadAcc(*this); bool bRet = false; @@ -1250,12 +1250,12 @@ bool Bitmap::ImplConvertDown(vcl::PixelFormat ePixelFormat, Color const * pExtCo if (pReadAcc) { BitmapPalette aPalette; - Bitmap aNewBmp(GetSizePixel(), ePixelFormat, &aPalette); + Bitmap aNewBmp(GetSizePixel(), vcl::PixelFormat::N8_BPP, &aPalette); BitmapScopedWriteAccess pWriteAcc(aNewBmp); if (pWriteAcc) { - sal_Int16 nNewBitCount = sal_Int16(ePixelFormat); + sal_Int16 nNewBitCount = sal_Int16(vcl::PixelFormat::N8_BPP); const sal_uInt16 nCount = 1 << nNewBitCount; const tools::Long nWidth = pWriteAcc->Width(); const tools::Long nWidth1 = nWidth - 1; -- cgit