[poincare] NAryExpressionNode: clean sortChildrenInPlace (the loop was

in descending order without any explanation)
This commit is contained in:
Émilie Feral
2019-11-05 09:41:26 +01:00
committed by EmilieNumworks
parent ce2fadaf25
commit 710d5259fe

View File

@@ -25,7 +25,7 @@ bool NAryExpressionNode::childAtIndexNeedsUserParentheses(const Expression & chi
void NAryExpressionNode::sortChildrenInPlace(ExpressionOrder order, Context * context, bool canSwapMatrices, bool canBeInterrupted) {
Expression reference(this);
for (int i = reference.numberOfChildren()-1; i > 0; i--) {
for (int i = 1; i < reference.numberOfChildren(); i++) {
bool isSorted = true;
for (int j = 0; j < reference.numberOfChildren()-1; j++) {
/* Warning: Matrix operations are not always commutative (ie,