From a3bedb7ae8f23476843e00380aba05002aa1e827 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Mon, 12 Jun 2017 02:12:56 +0200 Subject: use local statics for getUnoTunnelImplementationId replace uses of double checked locking pattern and rtl::Static Change-Id: I479d9d94f652b4fb4c67388405823a5f4e2b6ed4 Reviewed-on: https://gerrit.libreoffice.org/38690 Tested-by: Jenkins Reviewed-by: Noel Grandin --- accessibility/source/standard/vclxaccessibletoolbox.cxx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'accessibility') diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index 113391b8bf39..680ee72e4de6 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -145,17 +145,9 @@ namespace Sequence< sal_Int8 > OToolBoxWindowItem::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 implId; + + return implId.getImplementationId(); } sal_Int64 SAL_CALL OToolBoxWindowItem::getSomething( const Sequence< sal_Int8 >& _rId ) -- cgit