[Libreoffice-commits] core.git: include/vcl
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 10 20:37:19 UTC 2021
include/vcl/BitmapReadAccess.hxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 84e1c79dd7394168459a3bbdea8bd94d765708e0
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 10 18:13:00 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 10 22:36:41 2021 +0200
access maPalette via const BitmapBuffer* when in const method
Change-Id: I7bd1fb312ef7122e25c4d19679773d0c1ccab7be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121916
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 2659a9960a51..159ff38b157e 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -88,7 +88,10 @@ public:
BitmapColor GetColor(tools::Long nY, tools::Long nX) const
{
if (HasPalette())
- return mpBuffer->maPalette[GetPixelIndex(nY, nX)];
+ {
+ const BitmapBuffer* pBuffer = mpBuffer;
+ return pBuffer->maPalette[GetPixelIndex(nY, nX)];
+ }
else
return GetPixel(nY, nX);
}
More information about the Libreoffice-commits
mailing list