From f107e6893491bdf9e9bd1a8620218640ea76095a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 29 Jul 2021 19:42:51 +0200 Subject: osl::Mutex->std::mutex in OAccessibleKeyBindingHelper Change-Id: Ib308ede9561a3ff26cfc43bee202f3151fa07392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119694 Tested-by: Jenkins Reviewed-by: Noel Grandin --- comphelper/source/misc/accessiblekeybindinghelper.cxx | 8 ++++---- include/comphelper/accessiblekeybindinghelper.hxx | 9 +++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/comphelper/source/misc/accessiblekeybindinghelper.cxx b/comphelper/source/misc/accessiblekeybindinghelper.cxx index ce1203e42fcd..c30cb3307d48 100644 --- a/comphelper/source/misc/accessiblekeybindinghelper.cxx +++ b/comphelper/source/misc/accessiblekeybindinghelper.cxx @@ -55,7 +55,7 @@ namespace comphelper void OAccessibleKeyBindingHelper::AddKeyBinding( const Sequence< awt::KeyStroke >& rKeyBinding ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); m_aKeyBindings.push_back( rKeyBinding ); } @@ -63,7 +63,7 @@ namespace comphelper void OAccessibleKeyBindingHelper::AddKeyBinding( const awt::KeyStroke& rKeyStroke ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); m_aKeyBindings.push_back( { rKeyStroke } ); } @@ -73,7 +73,7 @@ namespace comphelper sal_Int32 OAccessibleKeyBindingHelper::getAccessibleKeyBindingCount() { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); return m_aKeyBindings.size(); } @@ -81,7 +81,7 @@ namespace comphelper Sequence< awt::KeyStroke > OAccessibleKeyBindingHelper::getAccessibleKeyBinding( sal_Int32 nIndex ) { - ::osl::MutexGuard aGuard( m_aMutex ); + std::lock_guard aGuard( m_aMutex ); if ( nIndex < 0 || nIndex >= static_cast(m_aKeyBindings.size()) ) throw IndexOutOfBoundsException(); diff --git a/include/comphelper/accessiblekeybindinghelper.hxx b/include/comphelper/accessiblekeybindinghelper.hxx index 4de48bf3ec39..fe6b03521f5b 100644 --- a/include/comphelper/accessiblekeybindinghelper.hxx +++ b/include/comphelper/accessiblekeybindinghelper.hxx @@ -21,14 +21,11 @@ #define INCLUDED_COMPHELPER_ACCESSIBLEKEYBINDINGHELPER_HXX #include +#include #include -#include - +#include #include -#include - - namespace comphelper { @@ -46,7 +43,7 @@ namespace comphelper private: typedef ::std::vector< css::uno::Sequence< css::awt::KeyStroke > > KeyBindings; KeyBindings m_aKeyBindings; - ::osl::Mutex m_aMutex; + std::mutex m_aMutex; virtual ~OAccessibleKeyBindingHelper() override; -- cgit