diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-15 12:43:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-15 14:33:52 +0100 |
commit | 52fece12345161911da2a531213b7d5541192aad (patch) | |
tree | fd27e700dc56ca5293e88746dbeed7cc08a57f3a /emfio | |
parent | 0a76eb059a77c799e6ce8400c558fc4dd1d866aa (diff) |
tweak GetBitmap methods in BitmapEx
so we return a const& for the normal case, just like other methods,
which reduces copying.
This revealed that CreateDisplayBitmap in Bitmap can be const.
Change-Id: I9f9b9ff0c52d7e95eaae62af152218be8847dd63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/mtftools.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 669585526918..461109067f66 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -1720,8 +1720,8 @@ namespace emfio // is inverted else if ( ( nWinRop == SRCAND ) && ( pSave2->nWinRop == SRCPAINT ) ) { - Bitmap aMask( pSave->aBmpEx.GetBitmap() ); - BitmapEx aBmpEx( pSave2->aBmpEx.GetBitmap(), aMask ); + const Bitmap & rMask( pSave->aBmpEx.GetBitmap() ); + BitmapEx aBmpEx( pSave2->aBmpEx.GetBitmap(), rMask ); ImplDrawBitmap( aPos, aSize, aBmpEx ); bDrawn = true; i++; @@ -1729,8 +1729,8 @@ namespace emfio // tdf#90539 else if ( ( nWinRop == SRCAND ) && ( pSave2->nWinRop == SRCINVERT ) ) { - Bitmap aMask( pSave->aBmpEx.GetBitmap() ); - BitmapEx aBmpEx( pSave2->aBmpEx.GetBitmap(), aMask ); + const Bitmap & rMask( pSave->aBmpEx.GetBitmap() ); + BitmapEx aBmpEx( pSave2->aBmpEx.GetBitmap(), rMask ); ImplDrawBitmap( aPos, aSize, aBmpEx ); bDrawn = true; i++; |