summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-23 12:00:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-24 08:22:05 +0200
commitffe251f62aec250118598041d3528cee54c65538 (patch)
tree0927351e2b5a2d1b5f086974db11c82db6fce862 /vcl
parent27bc42d77a71118b9e7cf11132ea4e47d42b676c (diff)
loplugin:useuniqueptr in ImplListBoxWindow
Change-Id: I9966baf9fd490fec4fb808f7e70470eb690dbc9e Reviewed-on: https://gerrit.libreoffice.org/53350 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/listbox.hxx4
-rw-r--r--vcl/source/control/imp_listbox.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 313ff8cbd047..1130ad9ef805 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -165,7 +165,7 @@ public:
class ImplListBoxWindow : public Control, public vcl::ISearchableStringList
{
private:
- ImplEntryList* mpEntryList; ///< EntryList
+ std::unique_ptr<ImplEntryList> mpEntryList; ///< EntryList
tools::Rectangle maFocusRect;
Size maUserItemSize;
@@ -255,7 +255,7 @@ public:
virtual ~ImplListBoxWindow() override;
virtual void dispose() override;
- ImplEntryList* GetEntryList() const { return mpEntryList; }
+ ImplEntryList* GetEntryList() const { return mpEntryList.get(); }
sal_Int32 InsertEntry( sal_Int32 nPos, ImplEntryType* pNewEntry );
void RemoveEntry( sal_Int32 nPos );
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 7dbabad9934a..f4100e13089d 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -461,7 +461,7 @@ ImplListBoxWindow::ImplListBoxWindow( vcl::Window* pParent, WinBits nWinStyle )
Control( pParent, 0 ),
maQuickSelectionEngine( *this )
{
- mpEntryList = new ImplEntryList( this );
+ mpEntryList.reset(new ImplEntryList( this ));
mnTop = 0;
mnLeft = 0;
@@ -508,7 +508,7 @@ ImplListBoxWindow::~ImplListBoxWindow()
void ImplListBoxWindow::dispose()
{
- delete mpEntryList;
+ mpEntryList.reset();
Control::dispose();
}