diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-03 11:36:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-03 12:20:53 +0200 |
commit | 05ab38359ae72f2a54dc0b5f1b84ac5f649c507a (patch) | |
tree | 5830c7ee2442984e0bc804def7bd95ddd8a25410 /oox | |
parent | 5afdcad4c0e7850b18996c549892b9360cd8973f (diff) |
Consolidate on C++17 std::scoped_lock instead of std::lock_guard
as in commit 9376f65a26240441bf9dd6ae1f69886dc9fa60fa
Change-Id: I3ad9afd4d113582a214a4a4bc7eea55e38cd6ff9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119927
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/filterbase.cxx | 4 | ||||
-rw-r--r-- | oox/source/helper/propertymap.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx index 7dd362a32954..ea22d1fbb8bc 100644 --- a/oox/source/core/filterbase.cxx +++ b/oox/source/core/filterbase.cxx @@ -93,7 +93,7 @@ private: DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl ) { UrlPool& rUrlPool = StaticUrlPool::get(); - std::lock_guard aGuard( rUrlPool.maMutex ); + std::scoped_lock aGuard( rUrlPool.maMutex ); mbValid = rUrl.isEmpty() || (rUrlPool.maUrls.count( rUrl ) == 0); if( mbValid && !rUrl.isEmpty() ) { @@ -105,7 +105,7 @@ DocumentOpenedGuard::DocumentOpenedGuard( const OUString& rUrl ) DocumentOpenedGuard::~DocumentOpenedGuard() { UrlPool& rUrlPool = StaticUrlPool::get(); - std::lock_guard aGuard( rUrlPool.maMutex ); + std::scoped_lock aGuard( rUrlPool.maMutex ); if( !maUrl.isEmpty() ) rUrlPool.maUrls.erase( maUrl ); } diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index e069efe3c537..afb6ef6ff6f6 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -125,7 +125,7 @@ Reference< XPropertySetInfo > SAL_CALL GenericPropertySet::getPropertySetInfo() void SAL_CALL GenericPropertySet::setPropertyValue( const OUString& rPropertyName, const Any& rValue ) { - std::lock_guard aGuard( mMutex ); + std::scoped_lock aGuard( mMutex ); maPropMap[ rPropertyName ] = rValue; } |