include/unotools/accessiblerelationsethelper.hxx | 4 ++-- unotools/source/accessibility/accessiblerelationsethelper.cxx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 049732b2190ee24b11a71f9236d597a37b54ea77 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jul 30 14:53:24 2021 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Jul 31 08:55:58 2021 +0200 osl::Mutex->std::mutex in AccessibleRelationSetHelper Change-Id: Ib7f44b7bd4b500960f771210177bcfc9476f36be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/unotools/accessiblerelationsethelper.hxx b/include/unotools/accessiblerelationsethelper.hxx index b3ab5b0e4b27..35277ae5bd5f 100644 --- a/include/unotools/accessiblerelationsethelper.hxx +++ b/include/unotools/accessiblerelationsethelper.hxx @@ -23,8 +23,8 @@ #include <unotools/unotoolsdllapi.h> #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp> -#include <osl/mutex.hxx> #include <cppuhelper/implbase.hxx> +#include <mutex> #include <vector> //= XAccessibleRelationSet helper classes @@ -115,7 +115,7 @@ public: private: /// Mutex guarding this object. - ::osl::Mutex maMutex; + std::mutex maMutex; /// The implementation of this helper interface. std::vector<css::accessibility::AccessibleRelation> maRelations; }; diff --git a/unotools/source/accessibility/accessiblerelationsethelper.cxx b/unotools/source/accessibility/accessiblerelationsethelper.cxx index 02b3ad572e34..e7bf704a300b 100644 --- a/unotools/source/accessibility/accessiblerelationsethelper.cxx +++ b/unotools/source/accessibility/accessiblerelationsethelper.cxx @@ -66,7 +66,7 @@ AccessibleRelationSetHelper::~AccessibleRelationSetHelper() sal_Int32 SAL_CALL AccessibleRelationSetHelper::getRelationCount( ) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); return maRelations.size(); } @@ -87,7 +87,7 @@ sal_Int32 SAL_CALL AccessibleRelation SAL_CALL AccessibleRelationSetHelper::getRelation( sal_Int32 nIndex ) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); if ((nIndex < 0) || (o3tl::make_unsigned(nIndex) >= maRelations.size())) throw lang::IndexOutOfBoundsException(); @@ -110,7 +110,7 @@ sal_Int32 SAL_CALL sal_Bool SAL_CALL AccessibleRelationSetHelper::containsRelation( sal_Int16 aRelationType ) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); AccessibleRelation defaultRelation; // default is INVALID AccessibleRelation relationByType = lcl_getRelationByType(maRelations, aRelationType); @@ -131,14 +131,14 @@ sal_Bool SAL_CALL AccessibleRelation SAL_CALL AccessibleRelationSetHelper::getRelationByType( sal_Int16 aRelationType ) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); return lcl_getRelationByType(maRelations, aRelationType); } void AccessibleRelationSetHelper::AddRelation(const AccessibleRelation& rRelation) { - osl::MutexGuard aGuard (maMutex); + std::lock_guard aGuard (maMutex); for (auto& aRelation: maRelations) {