From 3199d25a2e0f533fdd52e0a8006552df1a5932ca Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 16 Jan 2018 16:13:43 +0200 Subject: loplugin:useuniqueptr in SfxCommonTemplateDialog_Impl Change-Id: I484cb863c054c71cb22b30d108c95692213c8451 Reviewed-on: https://gerrit.libreoffice.org/48407 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/dialog/templdlg.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sfx2/source/dialog/templdlg.cxx') diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index fc1e0753c308..204a7346d6d5 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -861,7 +861,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() EndListening(*pStyleSheetPool); pStyleSheetPool = nullptr; pTreeBox.disposeAndClear(); - delete pIdle; + pIdle.reset(); if ( m_pDeletionWatcher ) m_pDeletionWatcher->signal(); aFmtLb.disposeAndClear(); @@ -1402,7 +1402,7 @@ IMPL_LINK_NOARG( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, void ) } } bDontUpdate=false; - DELETEZ(pIdle); + pIdle.reset(); } else pIdle->Start(); @@ -1488,7 +1488,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint { if(!pIdle) { - pIdle=new Idle("SfxCommonTemplate"); + pIdle.reset(new Idle("SfxCommonTemplate")); pIdle->SetPriority(TaskPriority::LOWEST); pIdle->SetInvokeHandler(LINK(this,SfxCommonTemplateDialog_Impl,TimeOut)); } -- cgit