summaryrefslogtreecommitdiff
path: root/cppuhelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-17 18:41:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-17 22:16:28 +0200
commit5962431c3d380f97f76c31869a1098e3efaa8b43 (patch)
tree1065b5904e75f82fc2516f9862795adf2f0be92e /cppuhelper
parentecf901685ac0c6c7b27b81096bea96cdc3d2c2ca (diff)
osl::Mutex->std::mutex in PropertySetMixinImpl
Change-Id: I45ae292e95efc57a125807d15c6c259533dd5f92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119106 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper')
-rw-r--r--cppuhelper/source/propertysetmixin.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx
index c7c8154896a4..0a270db6f17e 100644
--- a/cppuhelper/source/propertysetmixin.cxx
+++ b/cppuhelper/source/propertysetmixin.cxx
@@ -22,6 +22,7 @@
#include <algorithm>
#include <cassert>
#include <map>
+#include <mutex>
#include <set>
#include <vector>
@@ -67,7 +68,6 @@
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/propertysetmixin.hxx>
#include <cppuhelper/weak.hxx>
-#include <osl/mutex.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <sal/types.h>
@@ -381,7 +381,7 @@ public:
typedef std::map< OUString, VetoListenerBag > VetoListenerMap;
- mutable osl::Mutex mutex;
+ mutable std::mutex mutex;
BoundListenerMap boundListeners;
VetoListenerMap vetoListeners;
bool disposed;
@@ -853,7 +853,7 @@ void PropertySetMixinImpl::prepareSet(
Impl::VetoListenerBag specificVeto;
Impl::VetoListenerBag unspecificVeto;
{
- osl::MutexGuard g(m_impl->mutex);
+ std::lock_guard g(m_impl->mutex);
if (m_impl->disposed) {
throw css::lang::DisposedException(
"disposed", static_cast< css::beans::XPropertySet * >(this));
@@ -922,7 +922,7 @@ void PropertySetMixinImpl::dispose() {
Impl::BoundListenerMap boundListeners;
Impl::VetoListenerMap vetoListeners;
{
- osl::MutexGuard g(m_impl->mutex);
+ std::lock_guard g(m_impl->mutex);
boundListeners.swap(m_impl->boundListeners);
vetoListeners.swap(m_impl->vetoListeners);
m_impl->disposed = true;
@@ -1001,7 +1001,7 @@ void PropertySetMixinImpl::addPropertyChangeListener(
checkUnknown(propertyName);
bool disposed;
{
- osl::MutexGuard g(m_impl->mutex);
+ std::lock_guard g(m_impl->mutex);
disposed = m_impl->disposed;
if (!disposed) {
m_impl->boundListeners[propertyName].insert(listener);
@@ -1020,7 +1020,7 @@ void PropertySetMixinImpl::removePropertyChangeListener(
{
assert(listener.is());
checkUnknown(propertyName);
- osl::MutexGuard g(m_impl->mutex);
+ std::lock_guard g(m_impl->mutex);
Impl::BoundListenerMap::iterator i(
m_impl->boundListeners.find(propertyName));
if (i != m_impl->boundListeners.end()) {
@@ -1040,7 +1040,7 @@ void PropertySetMixinImpl::addVetoableChangeListener(
checkUnknown(propertyName);
bool disposed;
{
- osl::MutexGuard g(m_impl->mutex);
+ std::lock_guard g(m_impl->mutex);
disposed = m_impl->disposed;
if (!disposed) {
m_impl->vetoListeners[propertyName].insert(listener);
@@ -1059,7 +1059,7 @@ void PropertySetMixinImpl::removeVetoableChangeListener(
{
assert(listener.is());
checkUnknown(propertyName);
- osl::MutexGuard g(m_impl->mutex);
+ std::lock_guard g(m_impl->mutex);
Impl::VetoListenerMap::iterator i(m_impl->vetoListeners.find(propertyName));
if (i != m_impl->vetoListeners.end()) {
Impl::VetoListenerBag::iterator j(i->second.find(listener));