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

loplugin:useuniqueptr in SchLayoutTabPage

Change-Id: I8ba5a2e5800e88dcb6c17a8cf74bd315a9215918
Reviewed-on: https://gerrit.libreoffice.org/55528Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 4190daa5
...@@ -33,7 +33,7 @@ SchLayoutTabPage::SchLayoutTabPage(vcl::Window* pWindow,const SfxItemSet& rInAtt ...@@ -33,7 +33,7 @@ SchLayoutTabPage::SchLayoutTabPage(vcl::Window* pWindow,const SfxItemSet& rInAtt
: SfxTabPage(pWindow, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui", &rInAttrs) : SfxTabPage(pWindow, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui", &rInAttrs)
, m_pGeometryResources(nullptr) , m_pGeometryResources(nullptr)
{ {
m_pGeometryResources = new BarGeometryResources( this ); m_pGeometryResources.reset(new BarGeometryResources( this ));
} }
SchLayoutTabPage::~SchLayoutTabPage() SchLayoutTabPage::~SchLayoutTabPage()
...@@ -43,8 +43,7 @@ SchLayoutTabPage::~SchLayoutTabPage() ...@@ -43,8 +43,7 @@ SchLayoutTabPage::~SchLayoutTabPage()
void SchLayoutTabPage::dispose() void SchLayoutTabPage::dispose()
{ {
delete m_pGeometryResources; m_pGeometryResources.reset();
m_pGeometryResources = nullptr;
SfxTabPage::dispose(); SfxTabPage::dispose();
} }
......
...@@ -37,7 +37,7 @@ public: ...@@ -37,7 +37,7 @@ public:
virtual void Reset(const SfxItemSet* rInAttrs) override; virtual void Reset(const SfxItemSet* rInAttrs) override;
private: private:
BarGeometryResources* m_pGeometryResources; std::unique_ptr<BarGeometryResources> m_pGeometryResources;
}; };
} //namespace chart } //namespace chart
......
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