diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-13 09:59:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-16 08:23:14 +0200 |
commit | 58aab71b34327e71b27287b59b9e1d652bf316c3 (patch) | |
tree | 3ad295fd980b5e003b1a998b837c3e8d5661a310 | |
parent | 96e5d09224d46641278d995dc5fd463fac3dfa75 (diff) |
loplugin:useuniqueptr in DockingAreaWindow
Change-Id: I20fb393cfe4a129bc1007d00df5671c784ae85e4
Reviewed-on: https://gerrit.libreoffice.org/52891
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/vcl/dockingarea.hxx | 3 | ||||
-rw-r--r-- | vcl/source/window/dockingarea.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/vcl/dockingarea.hxx b/include/vcl/dockingarea.hxx index 2a178f530e5d..6f6e045c1451 100644 --- a/include/vcl/dockingarea.hxx +++ b/include/vcl/dockingarea.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VCL_DOCKINGAREA_HXX #include <vcl/window.hxx> +#include <memory> // A simple container for docked toolbars // - its main purpose is theming support @@ -29,7 +30,7 @@ class VCL_DLLPUBLIC DockingAreaWindow : public vcl::Window class ImplData; private: - ImplData* mpImplData; + std::unique_ptr<ImplData> mpImplData; DockingAreaWindow (const DockingAreaWindow &) = delete; DockingAreaWindow & operator= (const DockingAreaWindow &) = delete; diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index 4d01b3625e0c..647f87bf3d36 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -44,7 +44,7 @@ DockingAreaWindow::DockingAreaWindow( vcl::Window* pParent ) : { ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, nullptr ); - mpImplData = new ImplData; + mpImplData.reset(new ImplData); } DockingAreaWindow::~DockingAreaWindow() @@ -54,7 +54,7 @@ DockingAreaWindow::~DockingAreaWindow() void DockingAreaWindow::dispose() { - delete mpImplData; + mpImplData.reset(); Window::dispose(); } |