summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-01 18:56:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-02 08:37:00 +0200
commite98f04cedff85fd6a355a67cabd507782e2f693b (patch)
tree0fec135fec6d12b465582ba0269bd4fac7a682c5 /stoc
parent7c38362dbe1922c9825dffb463072030948d406b (diff)
osl::Mutex->std::mutex in LRU_Cache
Change-Id: Ia84cef550412540aa511f917198712add32fc7ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119831 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/corereflection/lrucache.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx
index 4ed99eaa77b0..c004d605485a 100644
--- a/stoc/source/corereflection/lrucache.hxx
+++ b/stoc/source/corereflection/lrucache.hxx
@@ -22,10 +22,10 @@
// __CACHE_DIAGNOSE forces cache size to 4 and works only for OUString keys
// #define __CACHE_DIAGNOSE 1
-#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <memory>
+#include <mutex>
#include <unordered_map>
namespace com::sun::star::uno { class Any; }
@@ -45,7 +45,7 @@ class LRU_Cache
};
typedef std::unordered_map< t_Key, CacheEntry *, t_KeyHash > t_Key2Element;
- mutable ::osl::Mutex _aCacheMutex;
+ mutable std::mutex _aCacheMutex;
sal_Int32 _nCachedElements;
t_Key2Element _aKey2Element;
@@ -126,7 +126,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::toFront( CacheEntry * pEntry )
template< class t_Key, class t_Val, class t_KeyHash >
inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash >::getValue( const t_Key & rKey ) const
{
- ::osl::MutexGuard aGuard( _aCacheMutex );
+ std::lock_guard aGuard( _aCacheMutex );
const typename t_Key2Element::const_iterator iFind( _aKey2Element.find( rKey ) );
if (iFind != _aKey2Element.end())
{
@@ -146,7 +146,7 @@ template< class t_Key, class t_Val, class t_KeyHash >
inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::setValue(
const t_Key & rKey, const t_Val & rValue )
{
- ::osl::MutexGuard aGuard( _aCacheMutex );
+ std::lock_guard aGuard( _aCacheMutex );
if (_nCachedElements > 0)
{
const typename t_Key2Element::const_iterator iFind( _aKey2Element.find( rKey ) );
@@ -184,7 +184,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::setValue(
template< class t_Key, class t_Val, class t_KeyHash >
inline void LRU_Cache< t_Key, t_Val, t_KeyHash >::clear()
{
- ::osl::MutexGuard aGuard( _aCacheMutex );
+ std::lock_guard aGuard( _aCacheMutex );
_aKey2Element.clear();
for ( sal_Int32 nPos = _nCachedElements; nPos--; )
{