[Libreoffice-commits] core.git: svtools/inc svtools/source
Arnold Dumas
arnold at dumas.at
Mon Aug 22 06:26:18 UTC 2016
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 <arnold at 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 <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at 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();
}
More information about the Libreoffice-commits
mailing list