diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-04-13 18:18:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-04-14 13:50:34 +0000 |
commit | 2deebf81db15688abfe1db059f73da4b8e410c25 (patch) | |
tree | f9a514782daf7a5b01e64a854f0baaf5227204b1 /connectivity/source | |
parent | 4e4023acd628e01caa5cd2ff7f9bb3484fd91beb (diff) |
tdf#97853 connectivity: fix inverted condition
Also in 2 places IS_TYPE was converted to dynamic_cast instead of a
typeid check; use typeid there too, just for consistency.
(regression from ac9671f94800b647f82b12e718968311a025e87e)
Change-Id: I0df47a845eff660c791304c22c97704589ab999f
(cherry picked from commit 49d320c6202a569f996c27fd824239f5f1f8a036)
Reviewed-on: https://gerrit.libreoffice.org/24062
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/file/fcode.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/fcomp.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index 352323b26c3c..06fdb5dad407 100644 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -370,7 +370,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack) ::std::vector<OOperand*>::iterator aEnd = aOperands.end(); for (; aIter != aEnd; ++aIter) { - if (typeid(OOperandResult) != typeid(*(*aIter))) + if (typeid(OOperandResult) == typeid(*(*aIter))) delete *aIter; } } diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 45037390e30e..c0008d4f8572 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -568,7 +568,7 @@ bool OPredicateInterpreter::evaluate(OCodeList& rCodeList) DBG_ASSERT(pOperand, "StackFehler"); bResult = pOperand->isValid(); - if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr) + if (typeid(OOperandResult) == typeid(*pOperand)) delete pOperand; return bResult; } @@ -595,7 +595,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD DBG_ASSERT(pOperand, "StackFehler"); (*_rVal) = pOperand->getValue(); - if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr) + if (typeid(OOperandResult) == typeid(*pOperand)) delete pOperand; } |