diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-12-23 22:09:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-24 16:05:43 +0100 |
commit | 122598af564082786f01b4eafdb9f09f0cffdf5f (patch) | |
tree | 148d44bc9f41e58c8cc01e83377786151b2ab44b /configmgr/source/lock.cxx | |
parent | 04ac09d4726767cadaf418f6349b7003693827b4 (diff) |
no need to use shared_ptr here
when we are really just sharing a single global lock object
Change-Id: I30d6f4cbd30cb7ee849f20a6c15615a94f67d7d8
Reviewed-on: https://gerrit.libreoffice.org/85768
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'configmgr/source/lock.cxx')
-rw-r--r-- | configmgr/source/lock.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/configmgr/source/lock.cxx b/configmgr/source/lock.cxx index 3c0e25d432c5..7a30e409b8fa 100644 --- a/configmgr/source/lock.cxx +++ b/configmgr/source/lock.cxx @@ -19,17 +19,15 @@ #include <sal/config.h> -#include <osl/mutex.hxx> - #include "lock.hxx" namespace configmgr { -std::shared_ptr<osl::Mutex> const & lock() -{ - static std::shared_ptr<osl::Mutex> theLock(new osl::Mutex); - return theLock; -} + osl::Mutex& theConfigLock() + { + static osl::Mutex lock; + return lock; + } } |