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.gran...@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 <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@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: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits