Kaydet (Commit) 30bb90fc authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in PathSettings

Change-Id: Ib0e6e293e10473b7ada3919f781cfd05ef78749c
Reviewed-on: https://gerrit.libreoffice.org/53761Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst ea33ae5e
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment