eventattacher/source/eventattacher.cxx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
New commits: commit 8b69e7b26cb9812cc2ad778077db750260969a9a Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Jul 17 19:49:17 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Jul 18 14:54:35 2021 +0200 osl::Mutex->std::mutex in EventAttacherImpl Change-Id: I44f23fd464479d2b89469179cefff50fc6defff5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx index 8a3b3af93338..b7988dbeff7b 100644 --- a/eventattacher/source/eventattacher.cxx +++ b/eventattacher/source/eventattacher.cxx @@ -39,6 +39,8 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> +#include <mutex> + namespace com::sun::star::lang { class XMultiServiceFactory; } using namespace com::sun::star::uno; @@ -249,7 +251,7 @@ private: const Sequence<css::script::EventListener>& aListeners ); private: - Mutex m_aMutex; + std::mutex m_aMutex; Reference< XComponentContext > m_xContext; // Save Services @@ -303,7 +305,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments) arg >>= xALAS; if( xALAS.is() ) { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); m_xInvocationAdapterFactory = xALAS; } // Introspection service ? @@ -311,7 +313,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments) arg >>= xI; if( xI.is() ) { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); m_xIntrospection = xI; } // Reflection service ? @@ -319,7 +321,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments) arg >>= xIdlR; if( xIdlR.is() ) { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); m_xReflection = xIdlR; } // Converter Service ? @@ -327,7 +329,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments) arg >>= xC; if( xC.is() ) { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); m_xConverter = xC; } @@ -341,7 +343,7 @@ void SAL_CALL EventAttacherImpl::initialize(const Sequence< Any >& Arguments) //*** Private helper methods *** Reference< XIntrospection > EventAttacherImpl::getIntrospection() { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if( !m_xIntrospection.is() ) { m_xIntrospection = theIntrospection::get( m_xContext ); @@ -353,7 +355,7 @@ Reference< XIntrospection > EventAttacherImpl::getIntrospection() //*** Private helper methods *** Reference< XIdlReflection > EventAttacherImpl::getReflection() { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if( !m_xReflection.is() ) { m_xReflection = theCoreReflection::get(m_xContext); @@ -365,7 +367,7 @@ Reference< XIdlReflection > EventAttacherImpl::getReflection() //*** Private helper methods *** Reference< XInvocationAdapterFactory2 > EventAttacherImpl::getInvocationAdapterService() { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if( !m_xInvocationAdapterFactory.is() ) { m_xInvocationAdapterFactory = InvocationAdapterFactory::create(m_xContext); @@ -377,7 +379,7 @@ Reference< XInvocationAdapterFactory2 > EventAttacherImpl::getInvocationAdapterS //*** Private helper methods *** Reference< XTypeConverter > EventAttacherImpl::getConverter() { - Guard< Mutex > aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if( !m_xConverter.is() ) { m_xConverter = Converter::create(m_xContext); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits