diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-04 16:34:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-11 08:27:43 +0200 |
commit | 949aecad9a6341d4994a716c22191c682e91bce7 (patch) | |
tree | 5509bc4048cd300dda4ff8979ce3b7cbec42dcc2 /chart2 | |
parent | 32a5477686ca68a452781119551a9f301e1b873c (diff) |
loplugin:useuniqueptr in ThreeD_SceneIllumination_TabPage
Change-Id: I297f79d38b6e04a6df322f875f9410078a01c1f3
Reviewed-on: https://gerrit.libreoffice.org/55531
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 5 | ||||
-rw-r--r-- | chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index ac1f95d7265d..c99e654dd2fd 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -230,7 +230,7 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage( vcl::Window* get(m_pCtl_Preview, "CTL_LIGHT_PREVIEW"); - m_pLightSourceInfoList = new LightSourceInfo[8]; + m_pLightSourceInfoList.reset(new LightSourceInfo[8]); m_pLightSourceInfoList[0].pButton = m_pBtn_Light1; m_pLightSourceInfoList[1].pButton = m_pBtn_Light2; m_pLightSourceInfoList[2].pButton = m_pBtn_Light3; @@ -270,8 +270,7 @@ ThreeD_SceneIllumination_TabPage::~ThreeD_SceneIllumination_TabPage() void ThreeD_SceneIllumination_TabPage::dispose() { - delete[] m_pLightSourceInfoList; - m_pLightSourceInfoList = nullptr; + m_pLightSourceInfoList.reset(); m_pBtn_Light1.clear(); m_pBtn_Light2.clear(); m_pBtn_Light3.clear(); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx index f35cb1b503a4..04023f053f7c 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx @@ -90,7 +90,7 @@ private: VclPtr<SvxLightCtl3D> m_pCtl_Preview; - LightSourceInfo* m_pLightSourceInfoList; + std::unique_ptr<LightSourceInfo[]> m_pLightSourceInfoList; css::uno::Reference< css::beans::XPropertySet > m_xSceneProperties; |