comphelper/source/misc/accessiblecontexthelper.cxx | 6 +----- include/comphelper/accessiblecontexthelper.hxx | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-)
New commits: commit 619a41940f0a3be91c8419a571943217183ced18 Author: Xisco Fauli <aniste...@gmail.com> Date: Wed Jun 1 01:20:00 2016 +0200 tdf#89329: use unique_ptr for pImpl in accessiblecontexthelper Change-Id: Ib78ee2f1faa4f9430e08bfbd0cfb0863da7d6dcb Reviewed-on: https://gerrit.libreoffice.org/25744 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Stahl <mst...@redhat.com> diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx index 7ff1bcb..02b7b9e 100644 --- a/comphelper/source/misc/accessiblecontexthelper.cxx +++ b/comphelper/source/misc/accessiblecontexthelper.cxx @@ -74,10 +74,9 @@ namespace comphelper OAccessibleContextHelper::OAccessibleContextHelper( IMutex* _pExternalLock ) :OAccessibleContextHelper_Base( GetMutex() ) - ,m_pImpl( nullptr ) + ,m_pImpl(new OContextHelper_Impl) { assert(_pExternalLock); - m_pImpl = new OContextHelper_Impl(); m_pImpl->setExternalLock( _pExternalLock ); } @@ -95,9 +94,6 @@ namespace comphelper // is not used anymore ensureDisposed(); - - delete m_pImpl; - m_pImpl = nullptr; } diff --git a/include/comphelper/accessiblecontexthelper.hxx b/include/comphelper/accessiblecontexthelper.hxx index ed029a0..3308c09 100644 --- a/include/comphelper/accessiblecontexthelper.hxx +++ b/include/comphelper/accessiblecontexthelper.hxx @@ -26,6 +26,7 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <comphelper/broadcasthelper.hxx> #include <comphelper/comphelperdllapi.h> +#include <memory> namespace comphelper @@ -86,7 +87,7 @@ namespace comphelper ,public OAccessibleContextHelper_Base { private: - OContextHelper_Impl* m_pImpl; + std::unique_ptr<OContextHelper_Impl> m_pImpl; protected: virtual ~OAccessibleContextHelper( ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits