diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-18 11:56:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-18 20:46:02 +0200 |
commit | 896e213395bdbd5adb3a62ece67fb28b4d78d6c9 (patch) | |
tree | 4eb112965acd594ca39140d95d6323c8f2d86ae0 /stoc/source/namingservice | |
parent | 198102e986d4db9067cc93e013c04cf3c96d227b (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/namingservice')
-rw-r--r-- | stoc/source/namingservice/namingservice.cxx | 10 |
1 files 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 <osl/mutex.hxx> #include <cppuhelper/factory.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> @@ -26,6 +25,7 @@ #include <com/sun/star/uno/XNamingService.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <mutex> #include <unordered_map> 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 ); } |