diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-18 11:59:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-18 21:59:50 +0200 |
commit | 3d18cae102e16b85fb8787f5ec3b086bfa2bd7b8 (patch) | |
tree | 67e80223d5afcb6c8db5124008e83ecb0050fb08 /stoc | |
parent | b1d2383a3311811a283bea720d3f0f1bfcb0fc3c (diff) |
osl::Mutex->std::mutex in ServiceEnumeration_Impl
Change-Id: I3d754006c7c2766281d924253f2caa0ff4963fea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119133
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 09814d5d08eb..f1543d293de7 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -51,6 +51,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <iterator> +#include <mutex> #include <string_view> #include <unordered_map> #include <unordered_set> @@ -137,7 +138,7 @@ public: sal_Bool SAL_CALL hasMoreElements() override; Any SAL_CALL nextElement() override; private: - Mutex aMutex; + std::mutex aMutex; Sequence< Reference<XInterface > > aFactories; sal_Int32 nIt; }; @@ -145,14 +146,14 @@ private: // XEnumeration sal_Bool ServiceEnumeration_Impl::hasMoreElements() { - MutexGuard aGuard( aMutex ); + std::lock_guard aGuard( aMutex ); return nIt != aFactories.getLength(); } // XEnumeration Any ServiceEnumeration_Impl::nextElement() { - MutexGuard aGuard( aMutex ); + std::lock_guard aGuard( aMutex ); if( nIt == aFactories.getLength() ) throw NoSuchElementException("no more elements"); |