diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-10 14:49:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-11 08:17:42 +0200 |
commit | 1476d95b6ed3afa35cccc46f61865ea938b62144 (patch) | |
tree | 7d89eea8c9a61cb8676389d2c066792e7b8b30fe /svl | |
parent | 9a9d407977494b405479b138a33fc6f8f1e2911d (diff) |
loplugin:useuniqueptr in StylePool::createIterator
Change-Id: I1a7bdfc00352c25f5d2db9ef195000d16f909537
Reviewed-on: https://gerrit.libreoffice.org/60263
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/stylepool.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index f1ddc7e0ab7b..6192adee6650 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -20,6 +20,7 @@ #include <svl/stylepool.hxx> #include <svl/itemiter.hxx> #include <svl/itempool.hxx> +#include <o3tl/make_unique.hxx> #include <algorithm> #include <map> #include <memory> @@ -357,7 +358,7 @@ public: std::shared_ptr<SfxItemSet> insertItemSet( const SfxItemSet& rSet ); // #i86923# - IStylePoolIteratorAccess* createIterator( bool bSkipUnusedItemSets, + std::unique_ptr<IStylePoolIteratorAccess> createIterator( bool bSkipUnusedItemSets, bool bSkipIgnorableItems ); }; @@ -432,10 +433,10 @@ std::shared_ptr<SfxItemSet> StylePoolImpl::insertItemSet( const SfxItemSet& rSet } // #i86923# -IStylePoolIteratorAccess* StylePoolImpl::createIterator( bool bSkipUnusedItemSets, +std::unique_ptr<IStylePoolIteratorAccess> StylePoolImpl::createIterator( bool bSkipUnusedItemSets, bool bSkipIgnorableItems ) { - return new Iterator( maRoot, bSkipUnusedItemSets, bSkipIgnorableItems ); + return o3tl::make_unique<Iterator>( maRoot, bSkipUnusedItemSets, bSkipIgnorableItems ); } // Ctor, Dtor and redirected methods of class StylePool, nearly inline ;-) @@ -448,7 +449,7 @@ std::shared_ptr<SfxItemSet> StylePool::insertItemSet( const SfxItemSet& rSet ) { return pImpl->insertItemSet( rSet ); } // #i86923# -IStylePoolIteratorAccess* StylePool::createIterator( const bool bSkipUnusedItemSets, +std::unique_ptr<IStylePoolIteratorAccess> StylePool::createIterator( const bool bSkipUnusedItemSets, const bool bSkipIgnorableItems ) { return pImpl->createIterator( bSkipUnusedItemSets, bSkipIgnorableItems ); |