diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-07-17 18:46:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-18 10:12:32 +0200 |
commit | bd90d1c630c93cf39f9bd83fc69c568c9d7eb35a (patch) | |
tree | 45e818dd929579ec5169d5a631dd9a80a1fa9e0c /cppuhelper | |
parent | 5db3a12dffd6edc96474a470728c1b89e129ca36 (diff) |
osl::Mutex->std::mutex in ContentEnumeration
Change-Id: I79457a4ffc957f6de47880fdc888648ab69d1349
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119107
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index d7eff0b74cf6..bf8e13fcc53e 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -12,6 +12,7 @@ #include <algorithm> #include <cassert> #include <iostream> +#include <mutex> #include <vector> #include <com/sun/star/beans/NamedValue.hpp> @@ -462,20 +463,20 @@ private: virtual css::uno::Any SAL_CALL nextElement() override; - osl::Mutex mutex_; + std::mutex mutex_; std::vector< css::uno::Any > factories_; std::vector< css::uno::Any >::const_iterator iterator_; }; sal_Bool ContentEnumeration::hasMoreElements() { - osl::MutexGuard g(mutex_); + std::lock_guard g(mutex_); return iterator_ != factories_.end(); } css::uno::Any ContentEnumeration::nextElement() { - osl::MutexGuard g(mutex_); + std::lock_guard g(mutex_); if (iterator_ == factories_.end()) { throw css::container::NoSuchElementException( "Bootstrap service manager service enumerator has no more elements", |