From a214ac677481883d31800bc2b67fd3a9c504319d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Dec 2023 11:17:23 +0200 Subject: simplify and modernise ScopedBitmapAccess (*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/qa/cppunit/jpeg/JpegReaderTest.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl/qa/cppunit/jpeg/JpegReaderTest.cxx') diff --git a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx index 0900c02d4bb5..f83d58d51d73 100644 --- a/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx +++ b/vcl/qa/cppunit/jpeg/JpegReaderTest.cxx @@ -14,7 +14,7 @@ #include #include -#include +#include #include constexpr OUStringLiteral gaDataUrl(u"/vcl/qa/cppunit/jpeg/data/"); @@ -176,7 +176,7 @@ void JpegReaderTest::testTdf138950() CPPUNIT_ASSERT_EQUAL(tools::Long(720), aSize.Width()); CPPUNIT_ASSERT_EQUAL(tools::Long(1280), aSize.Height()); - Bitmap::ScopedReadAccess pReadAccess(aBitmap); + BitmapScopedReadAccess pReadAccess(aBitmap); int nBlackCount = 0; for (tools::Long nY = 0; nY < aSize.Height(); ++nY) { -- cgit