summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-16 12:31:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-23 08:14:49 +0200
commite7197e9dc18dd00f1e553edfd163a0570ecde977 (patch)
tree7b2fb2755c1be5413b64ac6b39d2b39fba6d5e84 /vcl/source/control
parent3a35870a72cf6a8e481c70f972b7258b2dd764a9 (diff)
loplugin:useuniqueptr in Control
Change-Id: If445e1a8ae3a7e3988658c011f678ce1e603f4a9 Reviewed-on: https://gerrit.libreoffice.org/53230 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/ctrl.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index f0f38ac32178..8febfb02975d 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -39,7 +39,7 @@ void Control::ImplInitControlData()
{
mbHasControlFocus = false;
mbShowAccelerator = false;
- mpControlData = new ImplControlData;
+ mpControlData.reset(new ImplControlData);
}
Control::Control( WindowType nType ) :
@@ -62,8 +62,7 @@ Control::~Control()
void Control::dispose()
{
- delete mpControlData;
- mpControlData = nullptr;
+ mpControlData.reset();
Window::dispose();
}