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 /xmlsecurity | |
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 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/digestcontext.cxx | 4 | ||||
-rw-r--r-- | xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/digestcontext.cxx b/xmlsecurity/source/xmlsec/nss/digestcontext.cxx index 4f05dd4b0da9..63c128e7027f 100644 --- a/xmlsecurity/source/xmlsec/nss/digestcontext.cxx +++ b/xmlsecurity/source/xmlsec/nss/digestcontext.cxx @@ -37,7 +37,7 @@ ODigestContext::~ODigestContext() void SAL_CALL ODigestContext::updateDigest( const uno::Sequence< ::sal_Int8 >& aData ) { - std::lock_guard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); if ( m_bBroken ) throw uno::RuntimeException(); @@ -65,7 +65,7 @@ void SAL_CALL ODigestContext::updateDigest( const uno::Sequence< ::sal_Int8 >& a uno::Sequence< ::sal_Int8 > SAL_CALL ODigestContext::finalizeDigestAndDispose() { - std::lock_guard aGuard( m_aMutex ); + std::scoped_lock aGuard( m_aMutex ); if ( m_bBroken ) throw uno::RuntimeException(); diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx index 2f0d878d11db..34dbfabf6068 100644 --- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx +++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx @@ -211,7 +211,7 @@ void SecurityEnvironment_NssImpl::adoptSymKey( PK11SymKey* aSymKey ) { void SecurityEnvironment_NssImpl::updateSlots() { //In case new tokens are present then we can obtain the corresponding slot - std::lock_guard guard(m_mutex); + std::scoped_lock guard(m_mutex); m_Slots.clear(); m_tSymKeyList.clear(); |