diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-10 16:01:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-11 05:54:16 +0000 |
commit | b6977dad4535532d9bd897282f52806885862c83 (patch) | |
tree | cb4f4209cf589fce1647c2d0c009b8dd5f0fefde /connectivity/source | |
parent | 72c05eda32286703ec8315d05686d46ae824e194 (diff) |
osl::Mutex->std::mutex in OSQLParser
Change-Id: Ibc56fee796914a6dd39970f7a7879d5b5b2c219f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148660
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/parse/sqlbison.y | 3 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 10 |
2 files changed, 6 insertions, 7 deletions
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 6db0da9a4180..cbad86149fc2 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -4502,7 +4502,6 @@ void setParser(OSQLParser* _pParser) void OSQLParser::setParseTree(OSQLParseNode* pNewParseTree) { - ::osl::MutexGuard aGuard(getMutex()); m_pParseTree.reset(pNewParseTree); } @@ -4574,7 +4573,7 @@ std::unique_ptr<OSQLParseNode> OSQLParser::parseTree(OUString& rErrorMessage, // Guard the parsing - ::osl::MutexGuard aGuard(getMutex()); + std::unique_lock aGuard(getMutex()); // must be reset setParser(this); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index fecb00cdc9b2..4f213bf4f902 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1141,9 +1141,9 @@ OUString OSQLParser::stringToDouble(const OUString& _rValue,sal_Int16 _nScale) } -::osl::Mutex& OSQLParser::getMutex() +std::mutex& OSQLParser::getMutex() { - static ::osl::Mutex aMutex; + static std::mutex aMutex; return aMutex; } @@ -1154,7 +1154,7 @@ std::unique_ptr<OSQLParseNode> OSQLParser::predicateTree(OUString& rErrorMessage bool bUseRealName) { // Guard the parsing - ::osl::MutexGuard aGuard(getMutex()); + std::unique_lock aGuard(getMutex()); // must be reset setParser(this); @@ -1322,7 +1322,7 @@ OSQLParser::OSQLParser(css::uno::Reference< css::uno::XComponentContext > xConte #endif #endif - ::osl::MutexGuard aGuard(getMutex()); + std::unique_lock aGuard(getMutex()); // Do we have to initialize the data? if (s_nRefCount == 0) { @@ -1472,7 +1472,7 @@ OSQLParser::OSQLParser(css::uno::Reference< css::uno::XComponentContext > xConte OSQLParser::~OSQLParser() { - ::osl::MutexGuard aGuard(getMutex()); + std::unique_lock aGuard(getMutex()); OSL_ENSURE(s_nRefCount > 0, "OSQLParser::~OSQLParser() : suspicious call : has a refcount of 0 !"); if (!--s_nRefCount) { |