[Libreoffice-commits] core.git: cui/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Jun 21 13:16:27 UTC 2018


 cui/source/inc/cuitabarea.hxx     |    2 +-
 cui/source/tabpages/tppattern.cxx |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit db3c199e947c622afe3fa6e71632e41681562009
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jun 20 15:47:15 2018 +0200

    loplugin:useuniqueptr in SvxPatternTabPage
    
    Change-Id: I8b2493c723c65f90fd2dbef588c1fa1c669bcceb
    Reviewed-on: https://gerrit.libreoffice.org/56194
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 2c8e55234fe9..119c466a9971 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -592,7 +592,7 @@ private:
     VclPtr<PushButton>         m_pBtnAdd;
     VclPtr<PushButton>         m_pBtnModify;
 
-    SvxBitmapCtl*       m_pBitmapCtl;
+    std::unique_ptr<SvxBitmapCtl> m_pBitmapCtl;
 
     const SfxItemSet&   m_rOutAttrs;
 
diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx
index 9bb279850d1f..712bef2dc03e 100644
--- a/cui/source/tabpages/tppattern.cxx
+++ b/cui/source/tabpages/tppattern.cxx
@@ -109,7 +109,7 @@ SvxPatternTabPage::SvxPatternTabPage(  vcl::Window* pParent, const SfxItemSet& r
     m_pCtlPreview->set_width_request(aSize.Width());
     m_pCtlPreview->set_height_request(aSize.Height());
 
-    m_pBitmapCtl = new SvxBitmapCtl;
+    m_pBitmapCtl.reset(new SvxBitmapCtl);
 
     // this page needs ExchangeSupport
     SetExchangeSupport();
@@ -137,8 +137,7 @@ SvxPatternTabPage::~SvxPatternTabPage()
 
 void SvxPatternTabPage::dispose()
 {
-    delete m_pBitmapCtl;
-    m_pBitmapCtl = nullptr;
+    m_pBitmapCtl.reset();
     m_pCtlPixel.clear();
     m_pLbColor.clear();
     m_pLbBackgroundColor.clear();


More information about the Libreoffice-commits mailing list