summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold Dumas <arnold@dumas.at>2016-08-21 23:17:50 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-08-22 06:25:47 +0000
commitb65131af6005860d9977f669d8e68b8edcde239f (patch)
tree2f3d8fe44408dabf66c7e55886d13a2f2491aeee
parent0552ec9828ad65b1cf90f4e5253f0108facd5bf3 (diff)
tdf#89329: use unique_ptr for pImpl in roadmap
Change-Id: I1683b258d72c1ec4b29110203e8af7ff2596ebb0 Reviewed-on: https://gerrit.libreoffice.org/28283 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--svtools/inc/roadmap.hxx3
-rw-r--r--svtools/source/control/roadmap.cxx3
2 files changed, 3 insertions, 3 deletions
diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx
index 14d63ee2604f..312ec797ab29 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 2503ff4a3c0d..9eba20679a18 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();
}