removed "equation" field from PeverseNotationSolver because it is not really used and made this class static
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
class EquationManager
|
||||
{
|
||||
private static readonly HashSet<string> _operators = new() { "+", "-", "*", "/", "^", "√" };
|
||||
private ReverseNotationSolver reverseNotationSolver = new();
|
||||
|
||||
List<Token> equation = new();
|
||||
string currentOperand = "";
|
||||
@@ -145,7 +144,7 @@
|
||||
{
|
||||
if (currentOperand != "") equation.Add(new Token(Token.TokenType.Operand, currentOperand));
|
||||
buttonEquals.Text = "#";
|
||||
currentOperand = reverseNotationSolver.Solve(equation);
|
||||
currentOperand = ReverseNotationSolver.Solve(equation);
|
||||
UpdateLabels();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user