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

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


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

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

    osl::Mutex->std::mutex in CorrectSHA1DigestContext
    
    Change-Id: Ia81e8edd84080a2cb750e2dce7b2e8879b66498e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119281
    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 ab6327234f10..d13441462a3f 100644
--- a/package/source/zipapi/sha1context.cxx
+++ b/package/source/zipapi/sha1context.cxx
@@ -98,7 +98,7 @@ CorrectSHA1DigestContext::~CorrectSHA1DigestContext()
 
 void SAL_CALL CorrectSHA1DigestContext::updateDigest(const uno::Sequence<::sal_Int8>& rData)
 {
-    ::osl::MutexGuard aGuard(m_Mutex);
+    std::lock_guard aGuard(m_Mutex);
     if (m_bDisposed)
         throw lang::DisposedException();
 
@@ -107,7 +107,7 @@ void SAL_CALL CorrectSHA1DigestContext::updateDigest(const uno::Sequence<::sal_I
 
 uno::Sequence<::sal_Int8> SAL_CALL CorrectSHA1DigestContext::finalizeDigestAndDispose()
 {
-    ::osl::MutexGuard aGuard(m_Mutex);
+    std::lock_guard aGuard(m_Mutex);
     if (m_bDisposed)
         throw lang::DisposedException();
 
diff --git a/package/source/zipapi/sha1context.hxx b/package/source/zipapi/sha1context.hxx
index 55e61ee561cb..3e61cf17e681 100644
--- a/package/source/zipapi/sha1context.hxx
+++ b/package/source/zipapi/sha1context.hxx
@@ -24,6 +24,7 @@
 #include <comphelper/hash.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <osl/mutex.hxx>
+#include <mutex>
 
 class StarOfficeSHA1DigestContext
     : public cppu::WeakImplHelper<css::xml::crypto::XDigestContext>
@@ -49,7 +50,7 @@ public:
 class CorrectSHA1DigestContext
     : public cppu::WeakImplHelper<css::xml::crypto::XDigestContext>
 {
-    ::osl::Mutex m_Mutex;
+    std::mutex m_Mutex;
     ::comphelper::Hash m_Hash{::comphelper::HashType::SHA1};
     bool m_bDisposed{false};
 


More information about the Libreoffice-commits mailing list