[Libreoffice-commits] core.git: vcl/inc vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jul 20 19:04:46 UTC 2021
vcl/inc/displayconnectiondispatch.hxx | 4 ++--
vcl/source/helper/displayconnectiondispatch.cxx | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 5dcdfa148f6def1cdee628e6f7f1ec2421f45e82
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Mon Jul 19 17:51:26 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jul 20 21:04:02 2021 +0200
osl::Mutex->std::mutex in DisplayConnectionDispatch
Change-Id: I590595adbd89fa3d4833de2743b71168448d4c2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119283
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/vcl/inc/displayconnectiondispatch.hxx b/vcl/inc/displayconnectiondispatch.hxx
index e988ee62f378..a763ccd469c3 100644
--- a/vcl/inc/displayconnectiondispatch.hxx
+++ b/vcl/inc/displayconnectiondispatch.hxx
@@ -23,8 +23,8 @@
#include <sal/config.h>
#include <com/sun/star/awt/XDisplayConnection.hpp>
#include <cppuhelper/implbase.hxx>
-#include <osl/mutex.hxx>
#include <com/sun/star/uno/Reference.hxx>
+#include <mutex>
#include <vector>
namespace vcl {
@@ -32,7 +32,7 @@ namespace vcl {
class DisplayConnectionDispatch final :
public cppu::WeakImplHelper< css::awt::XDisplayConnection >
{
- ::osl::Mutex m_aMutex;
+ std::mutex m_aMutex;
::std::vector< css::uno::Reference< css::awt::XEventHandler > >
m_aHandlers;
OUString m_ConnectionIdentifier;
diff --git a/vcl/source/helper/displayconnectiondispatch.cxx b/vcl/source/helper/displayconnectiondispatch.cxx
index 85c4e8cdee01..72c3a435a57c 100644
--- a/vcl/source/helper/displayconnectiondispatch.cxx
+++ b/vcl/source/helper/displayconnectiondispatch.cxx
@@ -56,7 +56,7 @@ void DisplayConnectionDispatch::terminate()
SolarMutexReleaser aRel;
- MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
Any aEvent;
std::vector< css::uno::Reference< XEventHandler > > aLocalList( m_aHandlers );
for (auto const& elem : aLocalList)
@@ -65,14 +65,14 @@ void DisplayConnectionDispatch::terminate()
void SAL_CALL DisplayConnectionDispatch::addEventHandler( const Any& /*window*/, const css::uno::Reference< XEventHandler >& handler, sal_Int32 /*eventMask*/ )
{
- MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
m_aHandlers.push_back( handler );
}
void SAL_CALL DisplayConnectionDispatch::removeEventHandler( const Any& /*window*/, const css::uno::Reference< XEventHandler >& handler )
{
- MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
m_aHandlers.erase( std::remove(m_aHandlers.begin(), m_aHandlers.end(), handler), m_aHandlers.end() );
}
@@ -99,7 +99,7 @@ bool DisplayConnectionDispatch::dispatchEvent( void const * pData, int nBytes )
aEvent <<= aSeq;
::std::vector< css::uno::Reference< XEventHandler > > handlers;
{
- MutexGuard aGuard( m_aMutex );
+ std::lock_guard aGuard( m_aMutex );
handlers = m_aHandlers;
}
for (auto const& handle : handlers)
More information about the Libreoffice-commits
mailing list