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

loplugin:useuniqueptr in SdLayerManager

Change-Id: I95c17965e7de1daf0b548220326e05371b71b1ae
Reviewed-on: https://gerrit.libreoffice.org/56336
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 14b30639
......@@ -415,7 +415,7 @@ void SAL_CALL SdLayer::removeEventListener( const uno::Reference< lang::XEventLi
SdLayerManager::SdLayerManager( SdXImpressDocument& rMyModel ) throw()
:mpModel( &rMyModel)
{
mpLayers = new SvUnoWeakContainer;
mpLayers.reset(new SvUnoWeakContainer);
}
SdLayerManager::~SdLayerManager() throw()
......@@ -433,9 +433,7 @@ void SAL_CALL SdLayerManager::dispose( )
if( mpLayers )
{
mpLayers->dispose();
delete mpLayers;
mpLayers = nullptr;
mpLayers.reset();
}
}
......
......@@ -165,7 +165,7 @@ public:
private:
SdXImpressDocument* mpModel;
SvUnoWeakContainer* mpLayers;
std::unique_ptr<SvUnoWeakContainer> mpLayers;
::sd::View* GetView() const throw();
::sd::DrawDocShell* GetDocShell() const throw() { return mpModel->mpDocShell; }
......
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