diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-10 18:13:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-10 22:36:41 +0200 |
commit | 84e1c79dd7394168459a3bbdea8bd94d765708e0 (patch) | |
tree | 122ef3d553d85cd055e810fef42f2ea9c864ed1f /include | |
parent | d33f5abc4423aad4087eb77c920fcbd74e34533f (diff) |
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@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/BitmapReadAccess.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |