[Libreoffice-commits] core.git: include/svx svx/source

Arnold Dumas arnold at dumas.at
Wed Aug 24 06:53:57 UTC 2016


 include/svx/fmgridcl.hxx       |    3 ++-
 svx/source/fmcomp/fmgridcl.cxx |    3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8573b1baa66c65cc170d1393cacf948b4ead3e6a
Author: Arnold Dumas <arnold at dumas.at>
Date:   Tue Aug 23 19:12:21 2016 +0200

    tdf#89329: use unique_ptr for pImpl in fmgridcl
    
    Change-Id: If0fb04f41d2b9cd124d28278d121cd29b3e4d651
    Reviewed-on: https://gerrit.libreoffice.org/28350
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/include/svx/fmgridcl.hxx b/include/svx/fmgridcl.hxx
index da2ca0d..1c6dea5 100644
--- a/include/svx/fmgridcl.hxx
+++ b/include/svx/fmgridcl.hxx
@@ -25,6 +25,7 @@
 #include <svx/gridctrl.hxx>
 #include <svtools/transfer.hxx>
 #include <svx/svxdllapi.h>
+#include <memory>
 
 
 // FmGridHeader
@@ -35,7 +36,7 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC FmGridHeader
             ,public DropTargetHelper
 {
 protected:
-    FmGridHeaderData*       m_pImpl;
+    std::unique_ptr<FmGridHeaderData>       m_pImpl;
 
 public:
     FmGridHeader( BrowseBox* pParent, WinBits nWinBits = WB_STDHEADERBAR | WB_DRAG );
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index ea2243c..6494919 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -140,8 +140,7 @@ FmGridHeader::~FmGridHeader()
 
 void FmGridHeader::dispose()
 {
-    delete m_pImpl;
-    m_pImpl = nullptr;
+    m_pImpl.reset();
     DropTargetHelper::dispose();
     svt::EditBrowserHeader::dispose();
 }


More information about the Libreoffice-commits mailing list