diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-01-29 07:11:38 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-01-29 12:55:08 +0100 |
commit | 497452595bccf939e1a7e6b54b964e34504e5075 (patch) | |
tree | 95db573ddf32b8f5043742fbf1fdb501255f2519 /unotools | |
parent | 697399a78f17f5277d3e2962aa7b92e610619abe (diff) |
Replace rtl::Static with function-local static here
Change-Id: Iaba5c16c9f80431a5a9c03b94087e3f0b14fd9d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110132
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/moduleoptions.cxx | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 1468501220ec..ea3db01585c2 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -761,6 +761,12 @@ void SvtModuleOptions_Impl::MakeReadonlyStatesAvailable() namespace { //global std::weak_ptr<SvtModuleOptions_Impl> g_pModuleOptions; + +osl::Mutex& impl_GetOwnStaticMutex() +{ + static osl::Mutex s_Mutex; + return s_Mutex; +} } /*-************************************************************************************************************ @@ -907,23 +913,6 @@ bool SvtModuleOptions::IsDataBase() const return m_pImpl->IsModuleInstalled( EModule::DATABASE ); } -namespace -{ - class theModuleOptionsMutex : public rtl::Static<osl::Mutex, theModuleOptionsMutex> {}; -} -/*-**************************************************************************************************** - @short return a reference to a static mutex - @descr These class is threadsafe. - We create a static mutex only for one time and use it to protect our refcount and container - member! - @return A reference to a static mutex member. - @threadsafe yes -*//*-*****************************************************************************************************/ -::osl::Mutex& SvtModuleOptions::impl_GetOwnStaticMutex() -{ - return theModuleOptionsMutex::get(); -} - OUString SvtModuleOptions::GetModuleName( EModule eModule ) const { switch( eModule ) |