connectivity/source/parse/sqlnode.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit bb1f2894e40881abcfcb0372b2b3c8fae5b8cd6d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Sep 16 16:12:50 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Sep 16 22:07:28 2022 +0200 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 <caol...@redhat.com> 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; }),