summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-18 19:11:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-20 21:03:16 +0200
commit0c14226903804065bf6d6f52a05c2907b8c5a973 (patch)
tree094a530bc71f2955903a3654cf9069f4ee18a8a9 /package
parent9bae1f1ad6be4d942c73cfbdd7b3ba55eb3fb983 (diff)
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@collabora.co.uk>
Diffstat (limited to 'package')
-rw-r--r--package/source/zipapi/sha1context.cxx4
-rw-r--r--package/source/zipapi/sha1context.hxx3
2 files changed, 4 insertions, 3 deletions
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};