summaryrefslogtreecommitdiff
path: root/comphelper/source/misc/accimplaccess.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'comphelper/source/misc/accimplaccess.cxx')
-rw-r--r--comphelper/source/misc/accimplaccess.cxx18
1 files changed, 5 insertions, 13 deletions
diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx
index 7128d4e13991..e06df35cde0c 100644
--- a/comphelper/source/misc/accimplaccess.cxx
+++ b/comphelper/source/misc/accimplaccess.cxx
@@ -121,21 +121,13 @@ namespace comphelper
return ( NULL != pImplementation );
}
+ namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
+
//---------------------------------------------------------------------
- const Sequence< sal_Int8 >& OAccessibleImplementationAccess::getUnoTunnelImplementationId()
+ const Sequence< sal_Int8 > OAccessibleImplementationAccess::getUnoTunnelImplementationId()
{
- static Sequence< sal_Int8 > aId;
- if ( !aId.getLength() )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !aId.getLength() )
- {
- static ::cppu::OImplementationId aImplId;
- // unfortunately, the OImplementationId::getImplementationId returns a copy, not a static reference ...
- aId = aImplId.getImplementationId();
- }
- }
- return aId;
+ ::cppu::OImplementationId &rID = lcl_ImplId::get();
+ return rID.getImplementationId();
}
//---------------------------------------------------------------------