vcl/source/gdi/bitmap3.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
New commits: commit f1469adf0e81e6e7c8aa650c95d9e7a93bb18e85 Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Fri Dec 18 15:32:27 2020 +1100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Sat Dec 19 04:16:31 2020 +0100 vcl: remove bRet variable from Bitmap::Dither() Change-Id: I6b9b8107e745ba4c84d7add070562d876dbf03da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107948 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index e037c0c38c99..cd7232ed1b82 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -847,8 +847,6 @@ bool Bitmap::Dither() if( aSize.Width() == 1 || aSize.Height() == 1 ) return true; - bool bRet = false; - if( ( aSize.Width() > 3 ) && ( aSize.Height() > 2 ) ) { ScopedReadAccess pReadAcc(*this); @@ -964,14 +962,9 @@ bool Bitmap::Dither() pWriteAcc->SetPixelOnData( pScanline, nWidth1, BitmapColor(static_cast<sal_uInt8>(nVCLBLut[ nBC ] + nVCLGLut[nGC ] + nVCLRLut[nRC ])) ); } - bRet = true; - } - - pReadAcc.reset(); - pWriteAcc.reset(); + pReadAcc.reset(); + pWriteAcc.reset(); - if( bRet ) - { const MapMode aMap( maPrefMapMode ); const Size aPrefSize( maPrefSize ); @@ -979,10 +972,15 @@ bool Bitmap::Dither() maPrefMapMode = aMap; maPrefSize = aPrefSize; + + return true; } + + pReadAcc.reset(); + pWriteAcc.reset(); } - return bRet; + return false; } void Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, const Link<tools::Long,void>* pProgress ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits