unoxml/source/rdf/librdf_repository.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 6e8f63f772ebb9487c75324c23352ef3fea8e38b
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sat May 7 08:43:40 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat May 7 12:50:20 2022 +0200

    osl::Mutex->std::mutex in librdf_NamedGraph
    
    Change-Id: If28bef2bd44dc469e6534b166d4c25c0a7c3b2eb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133968
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/unoxml/source/rdf/librdf_repository.cxx 
b/unoxml/source/rdf/librdf_repository.cxx
index 7b5aaa508f0d..63654e09efdd 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -741,7 +741,7 @@ private:
 
     /// Querying is rather slow, so cache the results.
     std::map<OUString, std::vector<rdf::Statement>> m_aStatementsCache;
-    ::osl::Mutex m_CacheMutex;
+    std::mutex m_CacheMutex;
 };
 
 
@@ -783,7 +783,7 @@ void SAL_CALL librdf_NamedGraph::clear()
         throw lang::WrappedTargetRuntimeException( ex.Message,
                         *this, anyEx );
     }
-    ::osl::MutexGuard g(m_CacheMutex);
+    std::unique_lock g(m_CacheMutex);
     m_aStatementsCache.clear();
 }
 
@@ -798,7 +798,7 @@ void SAL_CALL librdf_NamedGraph::addStatement(
             "librdf_NamedGraph::addStatement: repository is gone", *this);
     }
     {
-        ::osl::MutexGuard g(m_CacheMutex);
+        std::unique_lock g(m_CacheMutex);
         m_aStatementsCache.clear();
     }
     m_pRep->addStatementGraph_NoLock(
@@ -816,7 +816,7 @@ void SAL_CALL librdf_NamedGraph::removeStatements(
             "librdf_NamedGraph::removeStatements: repository is gone", *this);
     }
     {
-        ::osl::MutexGuard g(m_CacheMutex);
+        std::unique_lock g(m_CacheMutex);
         m_aStatementsCache.clear();
     }
     m_pRep->removeStatementsGraph_NoLock(
@@ -845,7 +845,7 @@ librdf_NamedGraph::getStatements(
 {
     OUString cacheKey = createCacheKey_NoLock(i_xSubject, i_xPredicate, 
i_xObject);
     {
-        ::osl::MutexGuard g(m_CacheMutex);
+        std::unique_lock g(m_CacheMutex);
         auto it = m_aStatementsCache.find(cacheKey);
         if (it != m_aStatementsCache.end()) {
             return new librdf_GraphResult2(it->second);
@@ -861,7 +861,7 @@ librdf_NamedGraph::getStatements(
             i_xSubject, i_xPredicate, i_xObject, m_xName);
 
     {
-        ::osl::MutexGuard g(m_CacheMutex);
+        std::unique_lock g(m_CacheMutex);
         m_aStatementsCache.emplace(cacheKey, vStatements);
     }
     return new librdf_GraphResult2(vStatements);

Reply via email to