From 78a6ce17f06fbe13b806fd563e85a4fe60d3bcfc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Dec 2017 15:47:02 +0200 Subject: DELETEZ->std::unique_ptr in toolkit,unotools Change-Id: I2263e233ae03575e53ab4e7894a7507423afd32e Reviewed-on: https://gerrit.libreoffice.org/46397 Tested-by: Jenkins Reviewed-by: Noel Grandin --- toolkit/source/controls/unocontrol.cxx | 1 - toolkit/source/controls/unocontrolcontainer.cxx | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'toolkit/source') diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index f07ff4d64251..6c8435791883 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -150,7 +150,6 @@ UnoControl::UnoControl() : UnoControl::~UnoControl() { - DELETEZ( mpData ); } OUString UnoControl::GetComponentServiceName() diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index 0a992812f7d8..5b533dddb22a 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -381,7 +381,7 @@ UnoControlContainer::UnoControlContainer() :UnoControlContainer_Base() ,maCListeners( *this ) { - mpControls = new UnoControlHolderList; + mpControls.reset(new UnoControlHolderList); } UnoControlContainer::UnoControlContainer(const uno::Reference< awt::XWindowPeer >& xP ) @@ -390,12 +390,11 @@ UnoControlContainer::UnoControlContainer(const uno::Reference< awt::XWindowPeer { setPeer( xP ); mbDisposePeer = false; - mpControls = new UnoControlHolderList; + mpControls.reset(new UnoControlHolderList); } UnoControlContainer::~UnoControlContainer() { - DELETEZ( mpControls ); } void UnoControlContainer::ImplActivateTabControllers() @@ -433,8 +432,7 @@ void UnoControlContainer::dispose( ) // Delete all structures - DELETEZ( mpControls ); - mpControls = new UnoControlHolderList; + mpControls.reset(new UnoControlHolderList); UnoControlBase::dispose(); } -- cgit