[poincare] Clean

Change-Id: I132f49f26ccd1391051ac56acfebf4460e2bffb3
This commit is contained in:
Émilie Feral
2017-10-10 17:45:51 +02:00
parent 2e3e53a6bc
commit bc2f6539ee

View File

@@ -98,7 +98,7 @@ void Addition::immediateBeautify() {
int index = 0;
while (index < numberOfOperands()) {
// a+(-1)*b+... -> a-b+...
if (operand(index)->type() == Type::Multiplication && static_cast<const Multiplication *>(operand(index))->operand(0)->type() == Type::Rational && static_cast<const Rational *>(operand(index)->operand(0))->isMinusOne()) {
if (operand(index)->type() == Type::Multiplication && operand(index)->operand(0)->type() == Type::Rational && static_cast<const Rational *>(operand(index)->operand(0))->isMinusOne()) {
Multiplication * m = static_cast<Multiplication *>((Expression *)operand(index));
m->removeOperand(m->operand(0), true);
m->squashUnaryHierarchy();