mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 03:29:58 +02:00
[poincare] ParameteredExpression: overrides getVariables to avoid
considering parameter as a variable
This commit is contained in:
@@ -40,16 +40,15 @@ Expression ExpressionNode::deepReplaceReplaceableSymbols(Context * context, bool
|
||||
return Expression(this).defaultReplaceReplaceableSymbols(context, didReplace, replaceFunctionsOnly);
|
||||
}
|
||||
|
||||
int ExpressionNode::getVariables(Context * context, isVariableTest isVariable, char * variables, int maxSizeVariable) const {
|
||||
int numberOfVariables = 0;
|
||||
int ExpressionNode::getVariables(Context * context, isVariableTest isVariable, char * variables, int maxSizeVariable, int nextVariableIndex) const {
|
||||
for (ExpressionNode * c : children()) {
|
||||
int n = c->getVariables(context, isVariable, variables, maxSizeVariable);
|
||||
int n = c->getVariables(context, isVariable, variables, maxSizeVariable, nextVariableIndex);
|
||||
if (n < 0) {
|
||||
return n;
|
||||
}
|
||||
numberOfVariables = n > numberOfVariables ? n : numberOfVariables;
|
||||
nextVariableIndex = n;
|
||||
}
|
||||
return numberOfVariables;
|
||||
return nextVariableIndex;
|
||||
}
|
||||
|
||||
float ExpressionNode::characteristicXRange(Context * context, Preferences::AngleUnit angleUnit) const {
|
||||
|
||||
Reference in New Issue
Block a user