cppuhelper/source/propertysetmixin.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit 5962431c3d380f97f76c31869a1098e3efaa8b43 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Jul 17 18:41:48 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Jul 17 22:16:28 2021 +0200 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.gran...@collabora.co.uk> 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)); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits