diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-16 08:49:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-16 07:19:26 +0000 |
commit | 7a507b578910674eeab3062d3dbf893e2d54e9de (patch) | |
tree | 47b7360d266849873dbc900117235cf518ec2b7d /accessibility/source/standard | |
parent | 5de98da7e01b08f59b6f26daa82f3090bd6a4f42 (diff) |
new loplugin: useuniqueptr: accessibility
Change-Id: I0994bfcae23a2714c78e16c9baa7e0a018d46513
Reviewed-on: https://gerrit.libreoffice.org/33144
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/source/standard')
-rw-r--r-- | accessibility/source/standard/vclxaccessiblelist.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
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<ComboBox> (*pBox); + m_pListBoxHelper.reset( new VCLListBoxHelper<ComboBox> (*pBox) ); break; } @@ -82,7 +82,7 @@ VCLXAccessibleList::VCLXAccessibleList (VCLXWindow* pVCLWindow, BoxType aBoxType { VclPtr< ListBox > pBox = GetAs< ListBox >(); if ( pBox ) - m_pListBoxHelper = new VCLListBoxHelper<ListBox> (*pBox); + m_pListBoxHelper.reset( new VCLListBoxHelper<ListBox> (*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(); } |