diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-16 15:22:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-23 07:44:21 +0100 |
commit | 6ada5c93080b4a377ba4f7bb4f8677949cfa2e94 (patch) | |
tree | 3ef39492eafb2270c7c5355f33ae2c0e1163b3e5 /sfx2 | |
parent | 3a2a430ae8e2c1647c18d8904477949f6e2e7941 (diff) |
loplugin:useuniqueptr in SfxItemDisruptor_Impl
Change-Id: Ie85c1a8fd699f68ffcc8853be4bf8a86cfec06e7
Reviewed-on: https://gerrit.libreoffice.org/48295
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/itemdel.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx index 9ee76fd6a2bb..c6d53ef45936 100644 --- a/sfx2/source/control/itemdel.cxx +++ b/sfx2/source/control/itemdel.cxx @@ -26,7 +26,7 @@ class SfxItemDisruptor_Impl { - SfxPoolItem * pItem; + std::unique_ptr<SfxPoolItem> pItem; Idle m_Idle; private: @@ -64,7 +64,7 @@ SfxItemDisruptor_Impl::~SfxItemDisruptor_Impl() // reset RefCount (was set to SFX_ITEMS_SPECIAL before!) pItem->SetRefCount( 0 ); - delete pItem; + pItem.reset(); } IMPL_LINK_NOARG(SfxItemDisruptor_Impl, Delete, Timer*, void) |