[poincare] Temporary fix of setParentRecursively

Change-Id: I7ebacb1d531dac17da43fa3c8cd0ed98af8c365e
This commit is contained in:
Émilie Feral
2017-09-26 16:32:12 +02:00
parent 4d2255d087
commit d12615ab8d

View File

@@ -153,6 +153,10 @@ template<typename T> T Expression::epsilon() {
}
void Expression::recursivelySetAsParentOfChildren() {
if (this->type() == Type::Complex) {
// TODO: this case should be useless once complex is a leaf expression!
return;
}
for (int i=0; i<numberOfOperands(); i++) {
Expression * child = const_cast<Expression *>(operand(i));
child->setParent(this);