From 7a507b578910674eeab3062d3dbf893e2d54e9de Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 16 Jan 2017 08:49:16 +0200 Subject: new loplugin: useuniqueptr: accessibility Change-Id: I0994bfcae23a2714c78e16c9baa7e0a018d46513 Reviewed-on: https://gerrit.libreoffice.org/33144 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- accessibility/source/standard/vclxaccessiblelist.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'accessibility/source') diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index e369ea329aa0..d0f87d3e9335 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -74,7 +74,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType { VclPtr< ComboBox > pBox = GetAs< ComboBox >(); if ( pBox ) - m_pListBoxHelper = new VCLListBoxHelper (*pBox); + m_pListBoxHelper.reset( new VCLListBoxHelper (*pBox) ); break; } @@ -82,7 +82,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType { VclPtr< ListBox > pBox = GetAs< ListBox >(); if ( pBox ) - m_pListBoxHelper = new VCLListBoxHelper (*pBox); + m_pListBoxHelper.reset( new VCLListBoxHelper (*pBox) ); break; } } @@ -98,7 +98,6 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType VCLXAccessibleList::~VCLXAccessibleList() { - delete m_pListBoxHelper; } @@ -115,8 +114,7 @@ void SAL_CALL VCLXAccessibleList::disposing() // Dispose all items in the list. clearItems(); - delete m_pListBoxHelper; - m_pListBoxHelper = nullptr; + m_pListBoxHelper.reset(); } -- cgit