sfx2/source/control/shell.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 5da6e7d2066565c99827127c703b705c2ff0a6de Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Jan 16 15:45:13 2018 +0200 loplugin:useuniqueptr in SfxShell_Impl Change-Id: If59142c2d55da5f3ccf2de101dbd9f18a8bda84c Reviewed-on: https://gerrit.libreoffice.org/48701 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits