diff options
-rw-r--r-- | connectivity/source/parse/sqlbison.y | 3 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 10 | ||||
-rw-r--r-- | include/connectivity/sqlparse.hxx | 2 |
3 files changed, 7 insertions, 8 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) { diff --git a/include/connectivity/sqlparse.hxx b/include/connectivity/sqlparse.hxx index d3eedd484137..c3314c470c6b 100644 --- a/include/connectivity/sqlparse.hxx +++ b/include/connectivity/sqlparse.hxx @@ -150,7 +150,7 @@ namespace connectivity OSQLParseNode* buildNode_STR_NUM(OSQLParseNode*& pLiteral); OSQLParseNode* buildNode_Date(const double& fValue, sal_Int32 nType); - static ::osl::Mutex& getMutex(); + static std::mutex& getMutex(); public: // if NULL, a default context will be used |