diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-01 10:10:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-01 16:11:06 +0200 |
commit | 608f273e9da412e7a2d884f2603756cb4ff4c8af (patch) | |
tree | 11b279b98062d17ee69f722ccb1532107a615789 /svl/source | |
parent | cc948b84b8550ba728b3dfbc40a9785b928910e9 (diff) |
can allocate these SfxItemSet on the stack
Change-Id: Ib2b89613ad3e8f2bcdd51bee10bab3559a64fce4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118208
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/stylepool.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index ea3efeaeb5f0..c241e61e85a1 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -24,6 +24,7 @@ #include <algorithm> #include <map> #include <memory> +#include <optional> #include <vector> namespace { @@ -385,10 +386,10 @@ std::shared_ptr<SfxItemSet> StylePoolImpl::insertItemSet( const SfxItemSet& rSet // Every SfxPoolItem in the SfxItemSet causes a step deeper into the tree, // a complete empty SfxItemSet would stay at the root node. // #i86923# insert ignorable items to the tree leaves. - std::unique_ptr<SfxItemSet> xFoundIgnorableItems; + std::optional<SfxItemSet> xFoundIgnorableItems; if ( mpIgnorableItems ) { - xFoundIgnorableItems.reset( new SfxItemSet( *mpIgnorableItems ) ); + xFoundIgnorableItems.emplace( *mpIgnorableItems ); } while( pItem ) { |