Kaydet (Commit) ff2037b7 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in TakeThread

Change-Id: I5d3d197d57235f2bd09cbf80a7a35314edda945d
Reviewed-on: https://gerrit.libreoffice.org/60192
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 4907cf58
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment