diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-07 14:05:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-08 17:50:19 +0200 |
commit | ff2037b76c83fca0371a78005283d641103565d0 (patch) | |
tree | 76d1852a7b1994fa036d96b66a8529a614759fba /cui | |
parent | 4907cf58bae433b833aa7fedc6a8aafd45e75a75 (diff) |
loplugin:useuniqueptr in TakeThread
Change-Id: I5d3d197d57235f2bd09cbf80a7a35314edda945d
Reviewed-on: https://gerrit.libreoffice.org/60192
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index fe99c5373ede..046aa4a5f26a 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -277,11 +277,11 @@ void TakeThread::execute() { sal_Int32 nEntries; GalleryTheme* pThm = mpBrowser->GetXChgData()->pTheme; - GalleryProgress* pStatusProgress; + std::unique_ptr<GalleryProgress> pStatusProgress; { SolarMutexGuard aGuard; - pStatusProgress = new GalleryProgress; + pStatusProgress.reset(new GalleryProgress); nEntries = mpBrowser->bTakeAll ? mpBrowser->m_pLbxFound->GetEntryCount() : mpBrowser->m_pLbxFound->GetSelectedEntryCount(); pThm->LockBroadcaster(); } @@ -307,7 +307,7 @@ void TakeThread::execute() SolarMutexGuard aGuard; pThm->UnlockBroadcaster(); - delete pStatusProgress; + pStatusProgress.reset(); } Application::PostUserEvent( LINK( mpProgress, TakeProgress, CleanUpHdl ), nullptr, true ); |