Kaydet (Commit) 943e12e7 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SfxViewShell_Impl

Change-Id: Ie9efff0d4872d5b3353b765d00e56593e151ff83
Reviewed-on: https://gerrit.libreoffice.org/54173Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 98194383
......@@ -51,7 +51,7 @@ struct SfxViewShell_Impl
::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
std::shared_ptr< vcl::PrinterController > m_xPrinterController;
mutable std::vector<SfxInPlaceClient*>* mpIPClients;
mutable std::unique_ptr<std::vector<SfxInPlaceClient*>> mpIPClients;
LibreOfficeKitCallback m_pLibreOfficeKitViewCallback;
void* m_pLibreOfficeKitViewData;
......
......@@ -222,7 +222,6 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
, m_bIsShowView(!(nFlags & SfxViewShellFlags::NO_SHOW))
, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog
, m_pController(nullptr)
, mpIPClients(nullptr)
, m_pLibreOfficeKitViewCallback(nullptr)
, m_pLibreOfficeKitViewData(nullptr)
, m_bTiledSearching(false)
......@@ -231,14 +230,13 @@ SfxViewShell_Impl::SfxViewShell_Impl(SfxViewShellFlags const nFlags)
SfxViewShell_Impl::~SfxViewShell_Impl()
{
DELETEZ(mpIPClients);
}
std::vector< SfxInPlaceClient* > *SfxViewShell_Impl::GetIPClients_Impl( bool bCreate ) const
{
if (!mpIPClients && bCreate)
mpIPClients = new std::vector< SfxInPlaceClient* >;
return mpIPClients;
mpIPClients.reset(new std::vector< SfxInPlaceClient* >);
return mpIPClients.get();
}
SFX_IMPL_SUPERCLASS_INTERFACE(SfxViewShell,SfxShell)
......
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