From eeaee6726c803cf18c84cd90fca381eb11e9d21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 29 Dec 2022 12:03:17 +0000 Subject: [PATCH] cid#1518242 Logically dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie0a426c207746cca19b652a51b6f567e4b9a0752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144860 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- drawinglayer/source/processor2d/cairopixelprocessor2d.cxx | 3 +-- drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx index 9235bc095c81..24cc193ab93f 100644 --- a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx @@ -175,8 +175,7 @@ std::vector createBitmapData(const BitmapEx& rBitmapEx) { Bitmap aSrcAlpha(rBitmapEx.GetAlpha().GetBitmap()); Bitmap::ScopedReadAccess pReadAccess(const_cast(rBitmapEx.GetBitmap())); - Bitmap::ScopedReadAccess pAlphaReadAccess(bAlpha ? aSrcAlpha.AcquireReadAccess() : nullptr, - aSrcAlpha); + Bitmap::ScopedReadAccess pAlphaReadAccess(aSrcAlpha.AcquireReadAccess(), aSrcAlpha); const tools::Long nHeight(pReadAccess->Height()); const tools::Long nWidth(pReadAccess->Width()); diff --git a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx index 794f0dee5b68..b830f2c7a3e6 100644 --- a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx @@ -418,8 +418,7 @@ ID2D1Bitmap* createB2DBitmap(const BitmapEx& rBitmapEx) { Bitmap aSrcAlpha(rBitmapEx.GetAlpha().GetBitmap()); Bitmap::ScopedReadAccess pReadAccess(const_cast(rBitmapEx.GetBitmap())); - Bitmap::ScopedReadAccess pAlphaReadAccess(bAlpha ? aSrcAlpha.AcquireReadAccess() : nullptr, - aSrcAlpha); + Bitmap::ScopedReadAccess pAlphaReadAccess(aSrcAlpha.AcquireReadAccess(), aSrcAlpha); const tools::Long nHeight(pReadAccess->Height()); const tools::Long nWidth(pReadAccess->Width());