chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 5 ++--- chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 949aecad9a6341d4994a716c22191c682e91bce7 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Jun 4 16:34:37 2018 +0200 loplugin:useuniqueptr in ThreeD_SceneIllumination_TabPage Change-Id: I297f79d38b6e04a6df322f875f9410078a01c1f3 Reviewed-on: https://gerrit.libreoffice.org/55531 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits