summaryrefslogtreecommitdiff
path: root/forms
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 /forms
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 'forms')
-rw-r--r--forms/source/richtext/richtextmodel.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index ba25affe199f..7d0ff09eeed8 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -524,17 +524,8 @@ namespace frm
Sequence< sal_Int8 > ORichTextModel::getEditEngineTunnelId()
{
- static ::cppu::OImplementationId * pId = nullptr;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+ static cppu::OImplementationId aId;
+ return aId.getImplementationId();
}