diff options
-rw-r--r-- | include/toolkit/helper/macros.hxx | 14 | ||||
-rw-r--r-- | include/ucbhelper/macros.hxx | 15 |
2 files changed, 6 insertions, 23 deletions
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx index ab9b0f4b3739..25c3e3d4c33f 100644 --- a/include/toolkit/helper/macros.hxx +++ b/include/toolkit/helper/macros.hxx @@ -60,22 +60,12 @@ css::uno::Sequence< sal_Int8 > ClassName::getImplementationId() \ IMPL_IMPLEMENTATION_ID( ClassName ) \ css::uno::Sequence< css::uno::Type > ClassName::getTypes() \ { \ - static ::cppu::OTypeCollection* pCollection = nullptr; \ - if( !pCollection ) \ - { \ - ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() ); \ - if( !pCollection ) \ - { \ - static ::cppu::OTypeCollection collection( \ + static ::cppu::OTypeCollection collection( \ cppu::UnoType<css::lang::XTypeProvider>::get(), - #define IMPL_XTYPEPROVIDER_END \ ); \ - pCollection = &collection; \ - } \ - } \ - return (*pCollection).getTypes(); \ + return collection.getTypes(); \ } diff --git a/include/ucbhelper/macros.hxx b/include/ucbhelper/macros.hxx index 09dca56d5750..6be773977867 100644 --- a/include/ucbhelper/macros.hxx +++ b/include/ucbhelper/macros.hxx @@ -48,20 +48,13 @@ Class::getImplementationId() \ css::uno::Sequence< css::uno::Type > SAL_CALL \ Class::getTypes() \ { \ - static cppu::OTypeCollection* pCollection = nullptr; \ - if ( !pCollection ) \ - { \ - osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() ); \ - if ( !pCollection ) \ - { \ - static cppu::OTypeCollection collection( + static cppu::OTypeCollection collection( + #define GETTYPES_IMPL_END \ ); \ - pCollection = &collection; \ - } \ - } \ - return (*pCollection).getTypes(); \ + \ + return collection.getTypes(); \ } |