[Libreoffice-commits] core.git: cppuhelper/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 18 08:13:04 UTC 2021
cppuhelper/source/servicemanager.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit bd90d1c630c93cf39f9bd83fc69c568c9d7eb35a
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Jul 17 18:46:51 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jul 18 10:12:32 2021 +0200
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 at collabora.co.uk>
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",
More information about the Libreoffice-commits
mailing list