diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-02 14:23:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-03 16:23:57 +0200 |
commit | 30bb90fc2a9726068db49ddb8c1e818777d5c5b1 (patch) | |
tree | 2ad58e17cb6daf05ed2c136612127cdd5b603d20 /framework | |
parent | ea33ae5ef0a9d6b03fdef6503066100d0ae12729 (diff) |
loplugin:useuniqueptr in PathSettings
Change-Id: Ib0e6e293e10473b7ada3919f781cfd05ef78749c
Reviewed-on: https://gerrit.libreoffice.org/53761
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/pathsettings.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
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 } |