[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - connectivity/source
Michael Stahl
mstahl at redhat.com
Thu Apr 14 13:50:54 UTC 2016
connectivity/source/drivers/file/fcode.cxx | 2 +-
connectivity/source/drivers/file/fcomp.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 2deebf81db15688abfe1db059f73da4b8e410c25
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Apr 13 18:18:11 2016 +0200
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 at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 352323b..06fdb5d 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 4503739..c0008d4 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;
}
More information about the Libreoffice-commits
mailing list