mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[poincare/parametered_expression] Remove redundant assert
This commit is contained in:
committed by
EmilieNumworks
parent
473982c575
commit
af64f50a63
@@ -38,9 +38,6 @@ protected:
|
||||
ParameteredExpression(const ParameteredExpressionNode * node) : Expression(node) {}
|
||||
};
|
||||
|
||||
static_assert(ParameteredExpression::ParameteredChildIndex() == 0, "ParameteredExpression::replaceUnknown might not be valid");
|
||||
static_assert(ParameteredExpression::ParameterChildIndex() == 1, "ParameteredExpression::replaceUnknown might not be valid");
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@ Expression ParameteredExpression::replaceUnknown(const Symbol & symbolToReplace,
|
||||
/* If the unknown is the parameter, replace the unknown in all children except
|
||||
* in the parameter and the parametered children */
|
||||
int childrenCount = numberOfChildren();
|
||||
assert(ParameteredChildIndex() == 0);
|
||||
assert(ParameterChildIndex() == 1);
|
||||
static_assert(ParameteredChildIndex() == 0 && ParameterChildIndex() == 1,
|
||||
"ParameteredExpression::replaceUnknown might not be valid");
|
||||
for (int i = 2; i < childrenCount; i++) {
|
||||
childAtIndex(i).replaceUnknown(symbolToReplace, unknownSymbol);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user