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 /sfx2 | |
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 'sfx2')
-rw-r--r-- | sfx2/source/control/thumbnailviewacc.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index 36c321bf3b24..453f67a8d5b4 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -517,7 +517,7 @@ ThumbnailViewItemAcc::~ThumbnailViewItemAcc() void ThumbnailViewItemAcc::ParentDestroyed() { - std::lock_guard aGuard( maMutex ); + std::scoped_lock aGuard( maMutex ); mpParent = nullptr; } @@ -731,7 +731,7 @@ lang::Locale SAL_CALL ThumbnailViewItemAcc::getLocale() void SAL_CALL ThumbnailViewItemAcc::addAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) { - std::lock_guard aGuard( maMutex ); + std::scoped_lock aGuard( maMutex ); if( !rxListener.is() ) return; @@ -753,7 +753,7 @@ void SAL_CALL ThumbnailViewItemAcc::addAccessibleEventListener( const uno::Refer void SAL_CALL ThumbnailViewItemAcc::removeAccessibleEventListener( const uno::Reference< accessibility::XAccessibleEventListener >& rxListener ) { - std::lock_guard aGuard( maMutex ); + std::scoped_lock aGuard( maMutex ); if( rxListener.is() ) { diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index f4fdb55037db..a35ce5269782 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -2670,7 +2670,7 @@ void SfxURLRelocator_Impl::initOfficeInstDirs() { if ( !mxOfficeInstDirs.is() ) { - std::lock_guard aGuard( maMutex ); + std::scoped_lock aGuard( maMutex ); if ( !mxOfficeInstDirs.is() ) { OSL_ENSURE( mxContext.is(), "No service manager!" ); |