diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-04 16:28:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-11 08:27:20 +0200 |
commit | b3380825a51682d67a3c8b706d1d73e9bd5585cf (patch) | |
tree | 09891a9b5c5824f238d5e87e7aa1becb9b340acf | |
parent | 4190daa52e6403f722bed25e16fe7bd9a199f2ab (diff) |
loplugin:useuniqueptr in SchLayoutTabPage
Change-Id: I8ba5a2e5800e88dcb6c17a8cf74bd315a9215918
Reviewed-on: https://gerrit.libreoffice.org/55528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | chart2/source/controller/dialogs/tp_PointGeometry.cxx | 5 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/tp_PointGeometry.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 2350c3eb3e5d..906ac1986446 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -33,7 +33,7 @@ SchLayoutTabPage::SchLayoutTabPage(vcl::Window* pWindow,const SfxItemSet& rInAtt : SfxTabPage(pWindow, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui", &rInAttrs) , m_pGeometryResources(nullptr) { - m_pGeometryResources = new BarGeometryResources( this ); + m_pGeometryResources.reset(new BarGeometryResources( this )); } SchLayoutTabPage::~SchLayoutTabPage() @@ -43,8 +43,7 @@ SchLayoutTabPage::~SchLayoutTabPage() void SchLayoutTabPage::dispose() { - delete m_pGeometryResources; - m_pGeometryResources = nullptr; + m_pGeometryResources.reset(); SfxTabPage::dispose(); } diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.hxx b/chart2/source/controller/dialogs/tp_PointGeometry.hxx index f095435bf7a9..f9cfad788f33 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.hxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.hxx @@ -37,7 +37,7 @@ public: virtual void Reset(const SfxItemSet* rInAttrs) override; private: - BarGeometryResources* m_pGeometryResources; + std::unique_ptr<BarGeometryResources> m_pGeometryResources; }; } //namespace chart |