svtools/inc/roadmap.hxx | 3 ++- svtools/source/control/roadmap.cxx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit b65131af6005860d9977f669d8e68b8edcde239f Author: Arnold Dumas <arn...@dumas.at> Date: Sun Aug 21 23:17:50 2016 +0200 tdf#89329: use unique_ptr for pImpl in roadmap Change-Id: I1683b258d72c1ec4b29110203e8af7ff2596ebb0 Reviewed-on: https://gerrit.libreoffice.org/28283 Reviewed-by: Noel Grandin <noelgran...@gmail.com> Tested-by: Noel Grandin <noelgran...@gmail.com> diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index 14d63ee..312ec79 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/roadmap.hxx @@ -24,6 +24,7 @@ #include <vcl/imgctrl.hxx> #include <svtools/hyperlabel.hxx> +#include <memory> class Bitmap; @@ -43,7 +44,7 @@ class RoadmapItem; class SVT_DLLPUBLIC ORoadmap : public Control, public RoadmapTypes { protected: - RoadmapImpl* m_pImpl; + std::unique_ptr<RoadmapImpl> m_pImpl; // Window overridables void Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect) override; void implInit(vcl::RenderContext& rRenderContext); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 2503ff4..9eba206 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -241,8 +241,7 @@ void ORoadmap::dispose() } if ( ! m_pImpl->isComplete() ) delete m_pImpl->InCompleteHyperLabel; - delete m_pImpl; - m_pImpl = nullptr; + m_pImpl.reset(); Control::dispose(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits