diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-23 14:50:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-25 09:03:55 +0200 |
commit | de2ac128da025502c533f8cede5862e054dd9c44 (patch) | |
tree | 1a69e35818a775ef81ba58b72737589d985415e2 /dbaccess/source/ui/uno | |
parent | 7ca950ec744b7af1d15724ec2abc296573a641e4 (diff) |
loplugin:useuniqueptr in dbaccess
Change-Id: Iecf167f2018537476107d0850bef6f6e8ae344a4
Reviewed-on: https://gerrit.libreoffice.org/41494
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/uno')
-rw-r--r-- | dbaccess/source/ui/uno/unoadmin.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/dbaccess/source/ui/uno/unoadmin.cxx b/dbaccess/source/ui/uno/unoadmin.cxx index 59e2647324c6..0a37676010a7 100644 --- a/dbaccess/source/ui/uno/unoadmin.cxx +++ b/dbaccess/source/ui/uno/unoadmin.cxx @@ -45,11 +45,9 @@ ODatabaseAdministrationDialog::ODatabaseAdministrationDialog(const Reference< XC ,m_pDatasourceItems(nullptr) ,m_pItemPool(nullptr) ,m_pItemPoolDefaults(nullptr) - ,m_pCollection(nullptr) { - - m_pCollection = new ::dbaccess::ODsnTypeCollection(_rxORB); - ODbAdminDialog::createItemSet(m_pDatasourceItems, m_pItemPool, m_pItemPoolDefaults, m_pCollection); + m_pCollection.reset( new ::dbaccess::ODsnTypeCollection(_rxORB) ); + ODbAdminDialog::createItemSet(m_pDatasourceItems, m_pItemPool, m_pItemPoolDefaults, m_pCollection.get()); } ODatabaseAdministrationDialog::~ODatabaseAdministrationDialog() @@ -63,10 +61,6 @@ ODatabaseAdministrationDialog::~ODatabaseAdministrationDialog() ODbAdminDialog::destroyItemSet(m_pDatasourceItems, m_pItemPool, m_pItemPoolDefaults); } } - - delete m_pCollection; - m_pCollection = nullptr; - } void ODatabaseAdministrationDialog::implInitialize(const Any& _rValue) |