diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-04 12:48:59 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-04 11:49:42 +0100 |
commit | a2058e7516a01167c2d20ed157500b38db967c64 (patch) | |
tree | 375dc0fd109e36bc490ee7e04d2201cee10e4cf2 /dbaccess | |
parent | b156ca6e4692c2a32f41b9dfcd543966efc64a5d (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 'dbaccess')
-rw-r--r-- | dbaccess/source/inc/apitools.hxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx index 1a4c3a639c9c..6208b146b4c0 100644 --- a/dbaccess/source/inc/apitools.hxx +++ b/dbaccess/source/inc/apitools.hxx @@ -155,17 +155,8 @@ public: #define IMPLEMENT_IMPLEMENTATION_ID( classname ) \ css::uno::Sequence< sal_Int8 > classname::getUnoTunnelImplementationId() \ { \ - 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(); \ } \ css::uno::Sequence< sal_Int8 > classname::getImplementationId() \ { \ |