[Libreoffice-commits] core.git: unoxml/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jul 31 20:33:30 UTC 2021
unoxml/source/xpath/xpathapi.cxx | 10 +++++-----
unoxml/source/xpath/xpathapi.hxx | 3 ++-
2 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 23071f68eaba463e9c1a00270e82ef51dcdcfce8
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Jul 31 19:58:42 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Jul 31 22:32:57 2021 +0200
osl::Mutex->std::mutex in CXPathAPI
Change-Id: I008e9d660b1c245aea57ebef02ab651d435a90d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119757
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index d6698c98a117..88f1d37c5d8c 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -72,7 +72,7 @@ namespace XPath
const OUString& aPrefix,
const OUString& aURI)
{
- ::osl::MutexGuard const g(m_Mutex);
+ std::lock_guard const g(m_Mutex);
m_nsmap.emplace(aPrefix, aURI);
}
@@ -81,7 +81,7 @@ namespace XPath
const OUString& aPrefix,
const OUString& aURI)
{
- ::osl::MutexGuard const g(m_Mutex);
+ std::lock_guard const g(m_Mutex);
if ((m_nsmap.find(aPrefix))->second == aURI) {
m_nsmap.erase(aPrefix);
@@ -284,7 +284,7 @@ namespace XPath
extensions_t extensions;
{
- ::osl::MutexGuard const g(m_Mutex);
+ std::lock_guard const g(m_Mutex);
nsmap = m_nsmap;
extensions = m_extensions;
}
@@ -365,7 +365,7 @@ namespace XPath
void SAL_CALL CXPathAPI::registerExtension(
const OUString& aName)
{
- ::osl::MutexGuard const g(m_Mutex);
+ std::lock_guard const g(m_Mutex);
// get extension from service manager
Reference< XXPathExtension > const xExtension(
@@ -383,7 +383,7 @@ namespace XPath
if (!xExtension.is()) {
throw RuntimeException();
}
- ::osl::MutexGuard const g(m_Mutex);
+ std::lock_guard const g(m_Mutex);
m_extensions.push_back( xExtension );
}
}
diff --git a/unoxml/source/xpath/xpathapi.hxx b/unoxml/source/xpath/xpathapi.hxx
index 154eb78f722d..50fa1952eae8 100644
--- a/unoxml/source/xpath/xpathapi.hxx
+++ b/unoxml/source/xpath/xpathapi.hxx
@@ -20,6 +20,7 @@
#pragma once
#include <map>
+#include <mutex>
#include <vector>
#include <sal/types.h>
@@ -53,7 +54,7 @@ namespace XPath
{
private:
- ::osl::Mutex m_Mutex;
+ std::mutex m_Mutex;
nsmap_t m_nsmap;
const css::uno::Reference< css::uno::XComponentContext > m_xContext;
extensions_t m_extensions;
More information about the Libreoffice-commits
mailing list