vcl/source/bitmap/BitmapDisabledImageFilter.cxx |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit dc451a30d4a42dcf7bc7f3a9b42721aa9d0dbd43
Author:     Chris Sherlock <chris.sherloc...@gmail.com>
AuthorDate: Sun Sep 1 03:45:36 2024 +1000
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Fri Sep 13 11:14:36 2024 +0200

    vcl: just return a BitmapEx() in BitmapDisabledImageFilter::execute()
    
    Change-Id: I2a257211d7fdf22abb8d6e1f994293873348b38e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173191
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx 
b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx
index e38c450d7949..396d0e0a2af7 100644
--- a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx
+++ b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx
@@ -26,7 +26,6 @@ BitmapEx BitmapDisabledImageFilter::execute(BitmapEx const& 
rBitmapEx) const
     Bitmap aGrey(aSize, ePixelFormat, pPal);
     BitmapScopedWriteAccess pGrey(aGrey);
 
-    BitmapEx aReturnBitmap;
     Bitmap aReadBitmap(rBitmapEx.GetBitmap());
     BitmapScopedReadAccess pRead(aReadBitmap);
     if (pRead && pGrey)
@@ -48,13 +47,9 @@ BitmapEx BitmapDisabledImageFilter::execute(BitmapEx const& 
rBitmapEx) const
     }
 
     if (rBitmapEx.IsAlpha())
-    {
-        aReturnBitmap = BitmapEx(aGrey, rBitmapEx.GetAlphaMask());
-    }
-    else
-        aReturnBitmap = BitmapEx(aGrey);
+        return BitmapEx(aGrey, rBitmapEx.GetAlphaMask());
 
-    return aReturnBitmap;
+    return BitmapEx(aGrey);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to