removed "equation" field from PeverseNotationSolver because it is not really used and made this class static

This commit is contained in:
2026-01-11 02:54:21 +05:00
parent 46dc513e87
commit 490dc23027
2 changed files with 20 additions and 34 deletions

View File

@@ -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();
}
}