diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-21 08:47:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-22 10:15:49 +0200 |
commit | 88c85c8aa377ccc017582d8a08e5f73391b5a446 (patch) | |
tree | 62d133967cea1bcac6ab62780bf666adb5a7a867 /sd/source | |
parent | 0bac5c7e7d71658c5056c4bf0b71fbfb51b92ca0 (diff) |
flatten vcl::LazyDelete
we can allocate the stored value in-line and avoid some pointer-chasing
Change-Id: I828814b127923cdcec1bf57b3b64dffab4cffaaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119298
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/view/viewoverlaymanager.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 3e7f187ea506..d1db1e73a194 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -90,8 +90,8 @@ const std::u16string_view aBigPlaceHolders[] = static BitmapEx* getButtonImage( int index, bool large ) { - static vcl::DeleteOnDeinit< BitmapEx > gSmallButtonImages[SAL_N_ELEMENTS(aSmallPlaceHolders)] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; - static vcl::DeleteOnDeinit< BitmapEx > gLargeButtonImages[SAL_N_ELEMENTS(aBigPlaceHolders)] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr }; + static vcl::DeleteOnDeinit< BitmapEx > gSmallButtonImages[SAL_N_ELEMENTS(aSmallPlaceHolders)] = { vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty }; + static vcl::DeleteOnDeinit< BitmapEx > gLargeButtonImages[SAL_N_ELEMENTS(aBigPlaceHolders)] = { vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty, vcl::DeleteOnDeinitFlag::Empty }; assert(SAL_N_ELEMENTS(aSmallPlaceHolders) == SAL_N_ELEMENTS(aBigPlaceHolders)); @@ -99,8 +99,8 @@ static BitmapEx* getButtonImage( int index, bool large ) { for (size_t i = 0; i < SAL_N_ELEMENTS(aSmallPlaceHolders); i++ ) { - gSmallButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aSmallPlaceHolders[i]))); - gLargeButtonImages[i].set(std::make_unique<BitmapEx>(OUString(aBigPlaceHolders[i]))); + gSmallButtonImages[i].set(OUString(aSmallPlaceHolders[i])); + gLargeButtonImages[i].set(OUString(aBigPlaceHolders[i])); } } |