summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-04-13 18:18:11 +0200
committerMichael Stahl <mstahl@redhat.com>2016-04-13 18:40:53 +0200
commit49d320c6202a569f996c27fd824239f5f1f8a036 (patch)
treea73a3a8c47ee41623cbd84f42f49f5deee5bcbd9 /connectivity
parent7f863e890640d0924a6e6f85cf99447dcd7836f7 (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
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/file/fcode.cxx2
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index f71502c3ec59..a536d0c5b452 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -366,7 +366,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
::std::vector<OOperand*>::const_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 4133b4ca2d74..8a4339f2ddf6 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -567,7 +567,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;
}
@@ -594,7 +594,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;
}