From 1ebeb51e8bfa7b139e2661e8fe460a102dfb5659 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 18 May 2018 15:27:18 +0200 Subject: loplugin:useuniqueptr in DbaIndexDialog Change-Id: Ife795db29256a50a93b668890c85473872d350a9 Reviewed-on: https://gerrit.libreoffice.org/54853 Tested-by: Jenkins Reviewed-by: Noel Grandin --- dbaccess/source/ui/dlg/indexdialog.cxx | 4 ++-- 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 m_pFields; VclPtr m_pClose; - OIndexCollection* m_pIndexes; + std::unique_ptr m_pIndexes; SvTreeListEntry* m_pPreviousSelection; bool m_bEditAgain; -- cgit