Kaydet (Commit) 37d93222 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in framework::Frame

Change-Id: Ic1350d5bff80d4a88d3949a412ee9bf02ad969ba
Reviewed-on: https://gerrit.libreoffice.org/60050
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7c945811
......@@ -418,7 +418,7 @@ private:
css::uno::Reference< css::frame::XDispatchInformationProvider > m_xDispatchInfoHelper;
css::uno::Reference< css::frame::XTitle > m_xTitleHelper;
WindowCommandDispatch* m_pWindowCommandDispatch;
std::unique_ptr<WindowCommandDispatch> m_pWindowCommandDispatch;
typedef std::unordered_map<OUString, css::beans::Property> TPropInfoHash;
TPropInfoHash m_lProps;
......@@ -810,7 +810,7 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
// So superfluous messages are filtered to NULL :-)
implts_startWindowListening();
m_pWindowCommandDispatch = new WindowCommandDispatch(m_xContext, this);
m_pWindowCommandDispatch.reset(new WindowCommandDispatch(m_xContext, this));
// Initialize title functionality
TitleHelper* pTitleHelper = new TitleHelper( m_xContext );
......@@ -2084,12 +2084,12 @@ void SAL_CALL Frame::disposing()
disableLayoutManager(layoutMgr);
}
WindowCommandDispatch * disp = nullptr;
std::unique_ptr<WindowCommandDispatch> disp;
{
SolarMutexGuard g;
std::swap(disp, m_pWindowCommandDispatch);
}
delete disp;
disp.reset();
// Send message to all listener and forget her references.
css::lang::EventObject aEvent( xThis );
......
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