From 48314f25241e014a634dd5371543b90137ffd2bc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 21 Nov 2018 11:46:43 +0200 Subject: improve function-local statics in basic..cui Change-Id: If737e8478f6f1c8fffb060ce132d80e0f07ef8ee Reviewed-on: https://gerrit.libreoffice.org/63701 Tested-by: Jenkins Reviewed-by: Noel Grandin --- configmgr/source/lock.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'configmgr') diff --git a/configmgr/source/lock.cxx b/configmgr/source/lock.cxx index 9258b35bfeb7..3c0e25d432c5 100644 --- a/configmgr/source/lock.cxx +++ b/configmgr/source/lock.cxx @@ -27,9 +27,7 @@ namespace configmgr { std::shared_ptr const & lock() { - static std::shared_ptr theLock; - if (!theLock.get()) - theLock.reset(new osl::Mutex); + static std::shared_ptr theLock(new osl::Mutex); return theLock; } -- cgit