[Libreoffice-commits] core.git: framework/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu May 3 14:24:20 UTC 2018
framework/source/services/pathsettings.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 30bb90fc2a9726068db49ddb8c1e818777d5c5b1
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed May 2 14:23:11 2018 +0200
loplugin:useuniqueptr in PathSettings
Change-Id: Ib0e6e293e10473b7ada3919f781cfd05ef78749c
Reviewed-on: https://gerrit.libreoffice.org/53761
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 82feb855a636..f24d4976c604 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -170,7 +170,7 @@ private:
/** helper to listen for configuration changes without ownership cycle problems */
css::uno::Reference< css::util::XChangesListener > m_xCfgNewListener;
- ::cppu::OPropertyArrayHelper* m_pPropHelp;
+ std::unique_ptr<::cppu::OPropertyArrayHelper> m_pPropHelp;
public:
@@ -468,8 +468,7 @@ void SAL_CALL PathSettings::disposing()
m_xCfgNew.clear();
m_xCfgNewListener.clear();
- delete m_pPropHelp;
- m_pPropHelp = nullptr;
+ m_pPropHelp.reset();
}
css::uno::Any SAL_CALL PathSettings::queryInterface( const css::uno::Type& _rType )
@@ -1099,8 +1098,7 @@ void PathSettings::impl_rebuildPropertyDescriptor()
++i;
}
- delete m_pPropHelp;
- m_pPropHelp = new ::cppu::OPropertyArrayHelper(m_lPropDesc, false); // false => not sorted ... must be done inside helper
+ m_pPropHelp.reset(new ::cppu::OPropertyArrayHelper(m_lPropDesc, false)); // false => not sorted ... must be done inside helper
// <- SAFE
}
More information about the Libreoffice-commits
mailing list