Skip to content

Commit

Permalink
Rename equalSignPressed to equalSignPressedBefore
Browse files Browse the repository at this point in the history
  • Loading branch information
minacode authored Dec 7, 2024
1 parent 9cb3b65 commit 3705dc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/displayapp/screens/Calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void Calculator::HandleInput() {
return;
}

if ((equalSignPressed && (*buttonText != '=')) || (error != Error::None)) {
if ((equalSignPressedBefore && (*buttonText != '=')) || (error != Error::None)) {
ResetInput();
UpdateOperation();
}
Expand Down Expand Up @@ -188,7 +188,7 @@ void Calculator::HandleInput() {
break;

case '=':
equalSignPressed = true;
equalSignPressedBefore = true;
Eval();
// If the operation is ' ' then we move the value to the result.
// We reset the input after this.
Expand Down Expand Up @@ -239,7 +239,7 @@ void Calculator::ResetInput() {
value = 0;
offset = FIXED_POINT_OFFSET;
operation = ' ';
equalSignPressed = false;
equalSignPressedBefore = false;
error = Error::None;
}

Expand Down

0 comments on commit 3705dc9

Please sign in to comment.