summaryrefslogtreecommitdiffstats
path: root/connectivity/source/drivers/hsqldb/HTable.cxx
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-06-12 02:12:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-13 09:13:37 +0200
commita3bedb7ae8f23476843e00380aba05002aa1e827 (patch)
tree0eb626a63ebb5d45c7e837def5cca433b96eba56 /connectivity/source/drivers/hsqldb/HTable.cxx
parentremove MAYBEFUTURE dead code (diff)
downloadcore-a3bedb7ae8f23476843e00380aba05002aa1e827.tar.gz
core-a3bedb7ae8f23476843e00380aba05002aa1e827.zip
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/hsqldb/HTable.cxx')
-rw-r--r--connectivity/source/drivers/hsqldb/HTable.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx
index 6ce97cd11b5e..6f0b4188943c 100644
--- a/connectivity/source/drivers/hsqldb/HTable.cxx
+++ b/connectivity/source/drivers/hsqldb/HTable.cxx
@@ -128,17 +128,9 @@ sdbcx::OCollection* OHSQLTable::createIndexes(const TStringVector& _rNames)
Sequence< sal_Int8 > OHSQLTable::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::lang::XUnoTunnel