From 896e213395bdbd5adb3a62ece67fb28b4d78d6c9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 18 Jul 2021 11:56:47 +0200 Subject: osl::Mutex->std::mutex in NamingService_Impl Change-Id: Ief6cf9df4caafcf72e31394488c407acb5d545fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119132 Tested-by: Jenkins Reviewed-by: Noel Grandin --- stoc/source/namingservice/namingservice.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index a71b3644f9e4..efc33e5adf77 100644 --- a/stoc/source/namingservice/namingservice.cxx +++ b/stoc/source/namingservice/namingservice.cxx @@ -18,7 +18,6 @@ */ -#include #include #include #include @@ -26,6 +25,7 @@ #include #include +#include #include using namespace cppu; @@ -47,7 +47,7 @@ namespace { class NamingService_Impl : public WeakImplHelper < XServiceInfo, XNamingService > { - Mutex aMutex; + std::mutex aMutex; HashMap_OWString_Interface aMap; public: NamingService_Impl(); @@ -89,7 +89,7 @@ Sequence< OUString > NamingService_Impl::getSupportedServiceNames() // XServiceInfo Reference< XInterface > NamingService_Impl::getRegisteredObject( const OUString& Name ) { - Guard< Mutex > aGuard( aMutex ); + std::lock_guard aGuard( aMutex ); Reference< XInterface > xRet; HashMap_OWString_Interface::iterator aIt = aMap.find( Name ); if( aIt != aMap.end() ) @@ -100,14 +100,14 @@ Reference< XInterface > NamingService_Impl::getRegisteredObject( const OUString& // XServiceInfo void NamingService_Impl::registerObject( const OUString& Name, const Reference< XInterface >& Object ) { - Guard< Mutex > aGuard( aMutex ); + std::lock_guard aGuard( aMutex ); aMap[ Name ] = Object; } // XServiceInfo void NamingService_Impl::revokeObject( const OUString& Name ) { - Guard< Mutex > aGuard( aMutex ); + std::lock_guard aGuard( aMutex ); aMap.erase( Name ); } -- cgit