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 --- package/source/zippackage/ZipPackage.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'package/source') diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index f0837489bcc3..488e927d80ae 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -63,7 +63,6 @@ #include #include #include -#include #include #include #include "com/sun/star/io/XAsyncOutputMonitor.hpp" @@ -1631,12 +1630,11 @@ uno::Reference < XSingleServiceFactory > ZipPackage::createServiceFactory( uno:: static_getSupportedServiceNames() ); } -namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; } - Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId() { - ::cppu::OImplementationId &rId = lcl_ImplId::get(); - return rId.getImplementationId(); + static ::cppu::OImplementationId implId; + + return implId.getImplementationId(); } sal_Int64 SAL_CALL ZipPackage::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) -- cgit