diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-18 15:27:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-29 08:21:25 +0200 |
commit | 1ebeb51e8bfa7b139e2661e8fe460a102dfb5659 (patch) | |
tree | 2ffe878c77eb205d49bea966b606e670a349002a | |
parent | 2e80fe39a438ab702ad8f3e2456159328cb16365 (diff) |
loplugin:useuniqueptr in DbaIndexDialog
Change-Id: Ife795db29256a50a93b668890c85473872d350a9
Reviewed-on: https://gerrit.libreoffice.org/54853
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/indexdialog.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index e2e7adc0986f..c12b89e5f5c1 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -215,7 +215,7 @@ namespace dbaui setToolBox(m_pActions); - m_pIndexes = new OIndexCollection(); + m_pIndexes.reset(new OIndexCollection()); try { m_pIndexes->attach(_rxIndexes); @@ -307,7 +307,7 @@ namespace dbaui void DbaIndexDialog::dispose() { setToolBox(nullptr); - delete m_pIndexes; + m_pIndexes.reset(); m_pActions.clear(); m_pIndexList.clear(); m_pIndexDetails.clear(); diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index 766177035374..e7b458559fbb 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -89,7 +89,7 @@ namespace dbaui VclPtr<IndexFieldsControl> m_pFields; VclPtr<PushButton> m_pClose; - OIndexCollection* m_pIndexes; + std::unique_ptr<OIndexCollection> m_pIndexes; SvTreeListEntry* m_pPreviousSelection; bool m_bEditAgain; |