[Libreoffice-commits] core.git: include/unotools unotools/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 31 08:02:21 UTC 2021
include/unotools/accessiblestatesethelper.hxx | 4 ++--
unotools/source/accessibility/accessiblestatesethelper.cxx | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 421c3c9ca4ad01540838cbe4ecb89e353a70e14c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 30 14:56:31 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 31 10:01:47 2021 +0200
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 at collabora.co.uk>
diff --git a/include/unotools/accessiblestatesethelper.hxx b/include/unotools/accessiblestatesethelper.hxx
index 6fa66279f885..b1e5644f1eea 100644
--- a/include/unotools/accessiblestatesethelper.hxx
+++ b/include/unotools/accessiblestatesethelper.hxx
@@ -22,8 +22,8 @@
#include <unotools/unotoolsdllapi.h>
#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
-#include <osl/mutex.hxx>
#include <cppuhelper/implbase.hxx>
+#include <mutex>
//= XAccessibleStateSet helper classes
@@ -126,7 +126,7 @@ public:
private:
/// Mutex guarding this object.
- ::osl::Mutex maMutex;
+ std::mutex maMutex;
/// The implementation of this helper interface.
sal_uInt64 maStates;
};
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;
More information about the Libreoffice-commits
mailing list