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

Noel Grandin noel.grandin at collabora.co.uk
Mon May 28 06:50:21 UTC 2018


 dbaccess/source/ui/control/marktree.cxx |    6 +++---
 dbaccess/source/ui/inc/marktree.hxx     |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 7f3c2ee6c135773c98ded063bdf10ec8900bf00f
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri May 18 13:41:19 2018 +0200

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

diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index cf8e16f4e3de..1893985aa6fa 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -41,7 +41,7 @@ OMarkableTreeListBox::~OMarkableTreeListBox()
 
 void OMarkableTreeListBox::dispose()
 {
-    delete m_pCheckButton;
+    m_pCheckButton.reset();
     DBTreeListBox::dispose();
 }
 
@@ -65,8 +65,8 @@ void OMarkableTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools
 
 void OMarkableTreeListBox::InitButtonData()
 {
-    m_pCheckButton = new SvLBoxButtonData( this );
-    EnableCheckButton( m_pCheckButton );
+    m_pCheckButton.reset( new SvLBoxButtonData( this ) );
+    EnableCheckButton( m_pCheckButton.get() );
 }
 
 void OMarkableTreeListBox::KeyInput( const KeyEvent& rKEvt )
diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx
index 721af1a31cbb..a8bd8b2a70db 100644
--- a/dbaccess/source/ui/inc/marktree.hxx
+++ b/dbaccess/source/ui/inc/marktree.hxx
@@ -34,7 +34,7 @@ namespace dbaui
 */
 class OMarkableTreeListBox : public DBTreeListBox
 {
-    SvLBoxButtonData*   m_pCheckButton;
+    std::unique_ptr<SvLBoxButtonData> m_pCheckButton;
     Link<void*,void>    m_aCheckButtonHandler;
 
 public:


More information about the Libreoffice-commits mailing list