summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-06-20 09:03:25 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-06-20 10:19:33 +0200
commit6ad13e0e5d1caa8e1ffcf7092e1c04011b5df055 (patch)
tree7c23a0cecafd94959d26909cfe0199f5e7f20253 /filter
parentb520005b1d42ce80296cbbc6b4fc3cc5e5d8cae0 (diff)
Demote from std::unique_lock to std::scoped_lock where applicable
Change-Id: I53a019f05978bab62ad0da3d0eb08f37f8ec1e18 Reviewed-on: https://gerrit.libreoffice.org/74414 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r--filter/qa/cppunit/xslt-test.cxx2
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/filter/qa/cppunit/xslt-test.cxx b/filter/qa/cppunit/xslt-test.cxx
index aab6e3287bde..061f25c43133 100644
--- a/filter/qa/cppunit/xslt-test.cxx
+++ b/filter/qa/cppunit/xslt-test.cxx
@@ -82,7 +82,7 @@ private:
}
void notifyDone() {
- std::unique_lock<std::mutex> g(m_mutex);
+ std::scoped_lock<std::mutex> g(m_mutex);
m_bDone = true;
m_cond.notify_all();
}
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index e4e31cdb351f..c2b9e9dd65fb 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -298,7 +298,7 @@ namespace XSLT
xsltTransformContextPtr tcontext = xsltNewTransformContext(
styleSheet, doc);
{
- std::unique_lock<std::mutex> g(m_mutex);
+ std::scoped_lock<std::mutex> g(m_mutex);
m_tcontext = tcontext;
}
oh->registercontext(m_tcontext);
@@ -334,7 +334,7 @@ namespace XSLT
xsltFreeStylesheet(styleSheet);
xsltTransformContextPtr tcontext = nullptr;
{
- std::unique_lock<std::mutex> g(m_mutex);
+ std::scoped_lock<std::mutex> g(m_mutex);
std::swap(m_tcontext, tcontext);
}
xsltFreeTransformContext(tcontext);
@@ -360,7 +360,7 @@ namespace XSLT
void Reader::forceStateStopped()
{
- std::unique_lock<std::mutex> g(m_mutex);
+ std::scoped_lock<std::mutex> g(m_mutex);
if (!m_tcontext)
return;
//tdf#100057 If we force a cancel, libxslt will of course just keep on going unless something