diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-21 18:44:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-22 09:51:40 +0100 |
commit | 2d073a759f77f80b44180eea32ba7131ad37b0bd (patch) | |
tree | 6a2842d6eb4e999692c75ed2b2f58ef8c9e655c4 | |
parent | a6ed7588114c643a4d4821201e81b149e3429f2c (diff) |
osl::Mutex->std::mutex in OPropertyArrayUsageHelper
Change-Id: I4fd784f291fd6606b25520e3f08aa8692132e997
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125634
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/comphelper/proparrhlp.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/comphelper/proparrhlp.hxx b/include/comphelper/proparrhlp.hxx index 8520ac58f87d..5db95972f556 100644 --- a/include/comphelper/proparrhlp.hxx +++ b/include/comphelper/proparrhlp.hxx @@ -22,7 +22,7 @@ #include <comphelper/propagg.hxx> #include <cppuhelper/propshlp.hxx> -#include <osl/mutex.hxx> +#include <mutex> #include <osl/diagnose.h> namespace comphelper @@ -34,9 +34,9 @@ class OPropertyArrayUsageHelper protected: static sal_Int32 s_nRefCount; static ::cppu::IPropertyArrayHelper* s_pProps; - static osl::Mutex& theMutex() + static std::mutex& theMutex() { - static osl::Mutex SINGLETON; + static std::mutex SINGLETON; return SINGLETON; } public: @@ -92,14 +92,14 @@ template<class TYPE> template <class TYPE> OPropertyArrayUsageHelper<TYPE>::OPropertyArrayUsageHelper() { - ::osl::MutexGuard aGuard(theMutex()); + std::unique_lock aGuard(theMutex()); ++s_nRefCount; } template <class TYPE> OPropertyArrayUsageHelper<TYPE>::~OPropertyArrayUsageHelper() { - ::osl::MutexGuard aGuard(theMutex()); + std::unique_lock aGuard(theMutex()); OSL_ENSURE(s_nRefCount > 0, "OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have a refcount of 0 !"); if (!--s_nRefCount) { @@ -114,7 +114,7 @@ template <class TYPE> OSL_ENSURE(s_nRefCount, "OPropertyArrayUsageHelper::getArrayHelper : suspicious call : have a refcount of 0 !"); if (!s_pProps) { - ::osl::MutexGuard aGuard(theMutex()); + std::unique_lock aGuard(theMutex()); if (!s_pProps) { s_pProps = createArrayHelper(); |