diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-09-16 16:12:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-16 22:07:28 +0200 |
commit | bb1f2894e40881abcfcb0372b2b3c8fae5b8cd6d (patch) | |
tree | beb25430a15d0edbbec3004781a4c05bb5337543 /connectivity | |
parent | bd3ef7afcc4548976303df9b58e50436c11e4736 (diff) |
OSL_ENSURE->assert where we would crash if not true
Change-Id: I1544573ea9f57b5ca732c9b05acae9b4f91f53ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140080
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index bd6853ecd1ee..f9bee9da69b6 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2355,7 +2355,7 @@ void OSQLParseNode::showParseTree( OUStringBuffer& _inout_rBuffer, sal_uInt32 nL void OSQLParseNode::insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree) { - OSL_ENSURE(pNewSubTree != nullptr, "OSQLParseNode: invalid NewSubTree"); + assert(pNewSubTree != nullptr && "OSQLParseNode: invalid NewSubTree"); OSL_ENSURE(pNewSubTree->getParent() == nullptr, "OSQLParseNode: Node is not an orphan"); // Create connection to getParent @@ -2367,7 +2367,7 @@ void OSQLParseNode::insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree) OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) { - OSL_ENSURE(nPos < m_aChildren.size(),"Illegal position for removeAt"); + assert(nPos < m_aChildren.size() && "Illegal position for removeAt"); auto aPos(m_aChildren.begin() + nPos); auto pNode = std::move(*aPos); @@ -2382,7 +2382,7 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) OSQLParseNode* OSQLParseNode::replace(OSQLParseNode* pOldSubNode, OSQLParseNode* pNewSubNode ) { - OSL_ENSURE(pOldSubNode != nullptr && pNewSubNode != nullptr, "OSQLParseNode: invalid nodes"); + assert(pOldSubNode != nullptr && pNewSubNode != nullptr && "OSQLParseNode: invalid nodes"); OSL_ENSURE(pNewSubNode->getParent() == nullptr, "OSQLParseNode: node already has getParent"); OSL_ENSURE(std::any_of(m_aChildren.begin(), m_aChildren.end(), [&] (std::unique_ptr<OSQLParseNode> const & r) { return r.get() == pOldSubNode; }), |