mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/symbol_abstract] Remove redundant code
This case is already handled in shallowReduce of Function and Symbol
This commit is contained in:
committed by
Émilie Feral
parent
407ce0534c
commit
f8050f0673
@@ -66,11 +66,6 @@ bool SymbolAbstract::matches(const SymbolAbstract & symbol, ExpressionTest test,
|
||||
}
|
||||
|
||||
Expression SymbolAbstract::Expand(const SymbolAbstract & symbol, Context * context, bool clone, ExpressionNode::SymbolicComputation symbolicComputation) {
|
||||
if (symbolicComputation == ExpressionNode::SymbolicComputation::ReplaceAllSymbolsWithUndefinedAndDoNotReplaceUnits
|
||||
|| symbolicComputation == ExpressionNode::SymbolicComputation::ReplaceAllSymbolsWithUndefinedAndReplaceUnits)
|
||||
{
|
||||
return Undefined::Builder();
|
||||
}
|
||||
bool shouldNotReplaceSymbols = symbolicComputation == ExpressionNode::SymbolicComputation::ReplaceDefinedFunctionsWithDefinitions;
|
||||
if (symbol.type() == ExpressionNode::Type::Symbol && shouldNotReplaceSymbols) {
|
||||
return clone ? symbol.clone() : *const_cast<SymbolAbstract *>(&symbol);
|
||||
|
||||
Reference in New Issue
Block a user