sd/inc/textapi.hxx | 2 +- sd/source/core/text/textapi.cxx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
New commits: commit f59d33a5302f20f98b0596c284116d1e30a17bd6 Author: Noel Grandin <[email protected]> Date: Mon May 21 16:37:56 2018 +0200 loplugin:useuniqueptr in TextApiObject Change-Id: I418f18a1e090dab2923395963b2a003df58890ae Reviewed-on: https://gerrit.libreoffice.org/54859 Tested-by: Jenkins <[email protected]> Reviewed-by: Noel Grandin <[email protected]> diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx index df771dc55e50..d81ecf4b4ce2 100644 --- a/sd/inc/textapi.hxx +++ b/sd/inc/textapi.hxx @@ -47,7 +47,7 @@ public: static TextApiObject* getImplementation( const css::uno::Reference< css::text::XText >& ); private: - TextAPIEditSource* mpSource; + std::unique_ptr<TextAPIEditSource> mpSource; TextApiObject( TextAPIEditSource* pEditSource ); }; diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx index a4bdb23e46bc..69462124ce27 100644 --- a/sd/source/core/text/textapi.cxx +++ b/sd/source/core/text/textapi.cxx @@ -144,8 +144,7 @@ void TextApiObject::dispose() if( mpSource ) { mpSource->Dispose(); - delete mpSource; - mpSource = nullptr; + mpSource.reset(); } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
