diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-30 14:56:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-31 10:01:47 +0200 |
commit | 421c3c9ca4ad01540838cbe4ecb89e353a70e14c (patch) | |
tree | 74826b672058c1fde452f3b8ada2949d5729e856 /unotools | |
parent | 049732b2190ee24b11a71f9236d597a37b54ea77 (diff) |
osl::Mutex->std::mutex in AccessibleStateSetHelper
Change-Id: I20baf32570eef64e8288bb82804c2530f2c6a96b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119712
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/accessibility/accessiblestatesethelper.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/unotools/source/accessibility/accessiblestatesethelper.cxx b/unotools/source/accessibility/accessiblestatesethelper.cxx index cec1f6bcd615..db725d079a06 100644 --- a/unotools/source/accessibility/accessiblestatesethelper.cxx +++ b/unotools/source/accessibility/accessiblestatesethelper.cxx @@ -70,7 +70,7 @@ AccessibleStateSetHelper::~AccessibleStateSetHelper() */ sal_Bool SAL_CALL AccessibleStateSetHelper::isEmpty () { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); return maStates == 0; } @@ -87,7 +87,7 @@ sal_Bool SAL_CALL AccessibleStateSetHelper::isEmpty () */ sal_Bool SAL_CALL AccessibleStateSetHelper::contains (sal_Int16 aState) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); return lcl_contains(maStates, aState); } @@ -110,14 +110,14 @@ sal_Bool SAL_CALL AccessibleStateSetHelper::contains (sal_Int16 aState) sal_Bool SAL_CALL AccessibleStateSetHelper::containsAll (const uno::Sequence<sal_Int16>& rStateSet) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); return std::all_of(rStateSet.begin(), rStateSet.end(), [this](const sal_Int16 nState) { return lcl_contains(maStates, nState); }); } uno::Sequence<sal_Int16> SAL_CALL AccessibleStateSetHelper::getStates() { - osl::MutexGuard aGuard(maMutex); + std::lock_guard aGuard(maMutex); uno::Sequence<sal_Int16> aRet(BITFIELDSIZE); sal_Int16* pSeq = aRet.getArray(); sal_Int16 nStateCount(0); @@ -134,7 +134,7 @@ uno::Sequence<sal_Int16> SAL_CALL AccessibleStateSetHelper::getStates() void AccessibleStateSetHelper::AddState(sal_Int16 aState) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); DBG_ASSERT(aState < BITFIELDSIZE, "the statesset is too small"); sal_uInt64 aTempBitSet(1); aTempBitSet <<= aState; @@ -143,7 +143,7 @@ void AccessibleStateSetHelper::AddState(sal_Int16 aState) void AccessibleStateSetHelper::RemoveState(sal_Int16 aState) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); DBG_ASSERT(aState < BITFIELDSIZE, "the statesset is too small"); sal_uInt64 aTempBitSet(1); aTempBitSet <<= aState; |