summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-16 15:45:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-29 07:16:54 +0100
commit5da6e7d2066565c99827127c703b705c2ff0a6de (patch)
tree74487193b4a7bc34b13e4e25be08d5a0c4166fea /sfx2
parent85b3c799ede62a3d7ad0493fc80b629214956601 (diff)
loplugin:useuniqueptr in SfxShell_Impl
Change-Id: If59142c2d55da5f3ccf2de101dbd9f18a8bda84c Reviewed-on: https://gerrit.libreoffice.org/48701 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/shell.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 5f0867e94cae..2f25891ce5e5 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -62,8 +62,8 @@ struct SfxShell_Impl: public SfxBroadcaster
SfxRepeatTarget* pRepeatTarget; // SbxObjectRef xParent;
bool bActive;
SfxDisableFlags nDisableFlags;
- svtools::AsynchronLink* pExecuter;
- svtools::AsynchronLink* pUpdater;
+ std::unique_ptr<svtools::AsynchronLink> pExecuter;
+ std::unique_ptr<svtools::AsynchronLink> pUpdater;
std::vector<std::unique_ptr<SfxSlot> > aSlotArr;
css::uno::Sequence < css::embed::VerbDescriptor > aVerbList;
@@ -80,7 +80,7 @@ struct SfxShell_Impl: public SfxBroadcaster
{
}
- virtual ~SfxShell_Impl() override { delete pExecuter; delete pUpdater;}
+ virtual ~SfxShell_Impl() override { pExecuter.reset(); pUpdater.reset();}
};
@@ -400,8 +400,8 @@ void SfxShell::ExecuteSlot( SfxRequest& rReq, bool bAsync )
else
{
if( !pImpl->pExecuter )
- pImpl->pExecuter = new svtools::AsynchronLink(
- Link<void*,void>( this, ShellCall_Impl ) );
+ pImpl->pExecuter.reset( new svtools::AsynchronLink(
+ Link<void*,void>( this, ShellCall_Impl ) ) );
pImpl->pExecuter->Call( new SfxRequest( rReq ) );
}
}
@@ -654,7 +654,7 @@ void SfxShell::UIFeatureChanged()
// something my get stuck in the bunkered tools. Asynchronous call to
// prevent recursion.
if ( !pImpl->pUpdater )
- pImpl->pUpdater = new svtools::AsynchronLink( Link<void*,void>( this, DispatcherUpdate_Impl ) );
+ pImpl->pUpdater.reset( new svtools::AsynchronLink( Link<void*,void>( this, DispatcherUpdate_Impl ) ) );
// Multiple views allowed
pImpl->pUpdater->Call( pFrame->GetDispatcher(), true );