diff options
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/core/api/TableDeco.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasecontext.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinExchange.cxx | 14 |
4 files changed, 12 insertions, 44 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index c78d8c961481..573f9cf14157 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2948,17 +2948,9 @@ void ORowSetClone::close() Sequence< sal_Int8 > ORowSetClone::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(); } // css::XUnoTunnel diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index 02e83ef1b336..fb747850163b 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -476,17 +476,9 @@ sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >& Sequence< sal_Int8 > ODBTableDecorator::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(); } void ODBTableDecorator::fillPrivileges() const diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index a29f9971e73a..7f6ac225a0b1 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -726,17 +726,9 @@ sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& r Sequence< sal_Int8 > ODatabaseContext::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(); } void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForDocument, BasicManager& _rBasicManager ) diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index 2214a4e8b8b0..1d027c04afda 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -83,17 +83,9 @@ namespace dbaui Sequence< sal_Int8 > OJoinExchObj::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 OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) |