summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/sorter/sortdynres.cxx13
-rw-r--r--ucb/source/sorter/sortresult.cxx13
2 files changed, 4 insertions, 22 deletions
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index caa5f97afc72..c62f102cc0d2 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -40,18 +40,9 @@ using namespace comphelper;
// The mutex to synchronize access to containers.
static osl::Mutex& getContainerMutex()
{
- static osl::Mutex* pMutex = nullptr;
- if( !pMutex )
- {
- osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
- if( !pMutex )
- {
- static osl::Mutex aMutex;
- pMutex = &aMutex;
- }
- }
+ static osl::Mutex ourMutex;
- return *pMutex;
+ return ourMutex;
}
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 154dc099831c..f842c45f78a6 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -49,18 +49,9 @@ using namespace cppu;
// The mutex to synchronize access to containers.
static osl::Mutex& getContainerMutex()
{
- static osl::Mutex* pMutex = nullptr;
- if( !pMutex )
- {
- osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
- if( !pMutex )
- {
- static osl::Mutex aMutex;
- pMutex = &aMutex;
- }
- }
+ static osl::Mutex ourMutex;
- return *pMutex;
+ return ourMutex;
}