include/sfx2/lnkbase.hxx | 2 +- sfx2/source/appl/lnkbase2.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit d728d5d192e6f100d64ffa2e267055a451e9e403 Author: Noel Grandin <[email protected]> Date: Tue Jan 16 15:20:30 2018 +0200 loplugin:useuniqueptr in SvBaseLink Change-Id: Iaa133fa7f3b4bc4adea1c1568015327b1694161b Reviewed-on: https://gerrit.libreoffice.org/48169 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index eaeebe466f40..6809a1d5ded6 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -88,7 +88,7 @@ protected: // Set LinkSourceName without action void SetName( const OUString & rLn ); - ImplBaseLinkData* pImplData; + std::unique_ptr<ImplBaseLinkData> pImplData; bool m_bIsReadOnly; css::uno::Reference<css::io::XInputStream> diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index faf9e92957c4..5d6ae348cd76 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -125,7 +125,7 @@ SvBaseLink::SvBaseLink() m_bIsReadOnly(false) { nObjType = OBJECT_CLIENT_SO; - pImplData = new ImplBaseLinkData; + pImplData.reset( new ImplBaseLinkData ); bVisible = bSynchron = true; bWasLastEditOK = false; } @@ -136,7 +136,7 @@ SvBaseLink::SvBaseLink( SfxLinkUpdateMode nUpdateMode, SotClipboardFormatId nCon m_bIsReadOnly(false) { nObjType = OBJECT_CLIENT_SO; - pImplData = new ImplBaseLinkData; + pImplData.reset( new ImplBaseLinkData ); bVisible = bSynchron = true; bWasLastEditOK = false; @@ -187,7 +187,7 @@ SvBaseLink::SvBaseLink( const OUString& rLinkName, sal_uInt16 nObjectType, SvLin bVisible = bSynchron = true; bWasLastEditOK = false; aLinkName = rLinkName; - pImplData = new ImplBaseLinkData; + pImplData.reset( new ImplBaseLinkData ); nObjType = nObjectType; if( !pObj ) @@ -231,7 +231,7 @@ SvBaseLink::~SvBaseLink() break; } - delete pImplData; + pImplData.reset(); } IMPL_LINK( SvBaseLink, EndEditHdl, const OUString&, _rNewName, void ) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
