Fix invalid check of m_precedenceOpCount (#298)

The conditional m_precedenceOpCount >= 0 was always true because m_precendenceOpCount is an unsigned type. Update the conditional to simply be true and rely on a break statement in the loop. Although this member variable used to be a signed type, in practice, the value was never less than 0.

How changes were validated:
Manual. Unit tests pass locally.
This commit is contained in:
Daniel Belcher
2019-04-09 14:12:28 -07:00
committed by GitHub
parent af41a183a7
commit 7ac750f7e5
2 changed files with 52 additions and 40 deletions

View File

@@ -129,6 +129,7 @@ private:
private:
void ProcessCommandWorker(OpCode wParam);
void ResolveHighestPrecedenceOperation();
void HandleErrorCommand(OpCode idc);
void HandleMaxDigitsReached();
void DisplayNum(void);