diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-29 11:22:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-29 14:35:44 +0200 |
commit | 6c7d6924511f3006f64fb9d3eadd289778098571 (patch) | |
tree | 297a3f410e9b3281a1799b18c98441a837b8a560 /unotools/source/config | |
parent | 2e894d5053dccadc41f4c449e8fbdd3ada0c5bdc (diff) |
rtl::Static -> static local
in a handful cases, like a map or a vector, we don't need init on demand
at all, the default constructor can be laid out at compile time
Change-Id: I2d404584b5aa23db7b1f779e160e04e72dd2aa74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119656
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/useroptions.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index bf877b790392..ffe01cca497c 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -23,7 +23,6 @@ #include <unotools/syslocale.hxx> #include <com/sun/star/uno/Any.hxx> #include <osl/mutex.hxx> -#include <rtl/instance.hxx> #include "itemholder1.hxx" #include <cppuhelper/implbase.hxx> @@ -282,14 +281,10 @@ SvtUserOptions::~SvtUserOptions() xImpl->RemoveListener(this); } -namespace -{ - class theUserOptionsMutex : public rtl::Static<osl::Mutex, theUserOptionsMutex>{}; -} - osl::Mutex& SvtUserOptions::GetInitMutex() { - return theUserOptionsMutex::get(); + static osl::Mutex gMutex; + return gMutex; } OUString SvtUserOptions::GetCompany () const { return GetToken(UserOptToken::Company); } |