[Libreoffice-commits] core.git: package/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 20 19:04:20 UTC 2021


 package/source/zipapi/sha1context.cxx |    4 ++--
 package/source/zipapi/sha1context.hxx |    3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 0f580560e917f37df94ed2e7ddff59661ae93d79
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Jul 18 19:13:32 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Jul 20 21:03:38 2021 +0200

    osl::Mutex->std::mutex in StarOfficeSHA1DigestContext
    
    Change-Id: I924796823230151a3edde2ead875cfc5bc5072d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119282
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/package/source/zipapi/sha1context.cxx b/package/source/zipapi/sha1context.cxx
index d13441462a3f..0da0648ea206 100644
--- a/package/source/zipapi/sha1context.cxx
+++ b/package/source/zipapi/sha1context.cxx
@@ -49,7 +49,7 @@ StarOfficeSHA1DigestContext::~StarOfficeSHA1DigestContext()
 
 void SAL_CALL StarOfficeSHA1DigestContext::updateDigest(const uno::Sequence<::sal_Int8>& aData)
 {
-    ::osl::MutexGuard aGuard( m_aMutex );
+    std::lock_guard aGuard( m_aMutex );
     if ( !m_pDigest )
         throw lang::DisposedException();
 
@@ -64,7 +64,7 @@ void SAL_CALL StarOfficeSHA1DigestContext::updateDigest(const uno::Sequence<::sa
 
 uno::Sequence<::sal_Int8> SAL_CALL StarOfficeSHA1DigestContext::finalizeDigestAndDispose()
 {
-    ::osl::MutexGuard aGuard( m_aMutex );
+    std::lock_guard aGuard( m_aMutex );
     if ( !m_pDigest )
         throw lang::DisposedException();
 
diff --git a/package/source/zipapi/sha1context.hxx b/package/source/zipapi/sha1context.hxx
index 3e61cf17e681..6cc09da01bb3 100644
--- a/package/source/zipapi/sha1context.hxx
+++ b/package/source/zipapi/sha1context.hxx
@@ -23,13 +23,12 @@
 
 #include <comphelper/hash.hxx>
 #include <cppuhelper/implbase.hxx>
-#include <osl/mutex.hxx>
 #include <mutex>
 
 class StarOfficeSHA1DigestContext
     : public cppu::WeakImplHelper<css::xml::crypto::XDigestContext>
 {
-    ::osl::Mutex m_aMutex;
+    std::mutex m_aMutex;
     void* m_pDigest;
 
     StarOfficeSHA1DigestContext()


More information about the Libreoffice-commits mailing list