summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-04 12:48:59 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-04 11:49:42 +0100
commita2058e7516a01167c2d20ed157500b38db967c64 (patch)
tree375dc0fd109e36bc490ee7e04d2201cee10e4cf2 /toolkit/source
parentb156ca6e4692c2a32f41b9dfcd543966efc64a5d (diff)
replace double-checked locking patterns with thread safe local statics
Change-Id: Ie1aae7ecbd065a88b371d8c0deb586f54f7eff65 Reviewed-on: https://gerrit.libreoffice.org/62835 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 1235e6c09889..4d05caa81ff8 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -79,18 +79,8 @@ namespace
{
const Sequence< OUString >& lcl_getLanguageDependentProperties()
{
- static Sequence< OUString > s_aLanguageDependentProperties;
- if ( s_aLanguageDependentProperties.getLength() == 0 )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( s_aLanguageDependentProperties.getLength() == 0 )
- {
- s_aLanguageDependentProperties.realloc( 2 );
- s_aLanguageDependentProperties[0] = "HelpText";
- s_aLanguageDependentProperties[1] = "Title";
- // note: properties must be sorted
- }
- }
+ // note: properties must be sorted
+ static Sequence<OUString> s_aLanguageDependentProperties{ "HelpText", "Title" };
return s_aLanguageDependentProperties;
}
}