summaryrefslogtreecommitdiff
path: root/linguistic/source/misc.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-14 22:12:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-15 09:25:13 +0100
commit1badef89c0794167b9b84ea44d4a7df5645de8a7 (patch)
tree26dfe81507556143eaae904180e7499f2b51481f /linguistic/source/misc.cxx
parent92857b181a715de08bd4264f4dc4161367d2b3c7 (diff)
rtl::Static->thread-safe static in linguistic
Change-Id: Ie028e0d93f4dec4974d357900a2d5d84275a9a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'linguistic/source/misc.cxx')
-rw-r--r--linguistic/source/misc.cxx15
1 files changed, 3 insertions, 12 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index c2ff50b7f527..09635359d1ce 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -42,8 +42,6 @@
#include <svtools/strings.hrc>
#include <unotools/resmgr.hxx>
-#include <rtl/instance.hxx>
-
#include <linguistic/misc.hxx>
#include <linguistic/hyphdta.hxx>
#include <mutex>
@@ -59,18 +57,11 @@ using namespace com::sun::star::linguistic2;
namespace linguistic
{
-namespace {
-
//!! multi-thread safe mutex for all platforms !!
-struct LinguMutex : public rtl::Static< osl::Mutex, LinguMutex >
-{
-};
-
-}
-
-osl::Mutex & GetLinguMutex()
+osl::Mutex & GetLinguMutex()
{
- return LinguMutex::get();
+ static osl::Mutex SINGLETON;
+ return SINGLETON;
}
const LocaleDataWrapper & GetLocaleDataWrapper( LanguageType nLang )