Fix "isIntgerMode" typo (#1921)

This commit is contained in:
Rose 2022-10-02 17:19:27 -04:00 committed by GitHub
commit 3d8576bad6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -143,14 +143,14 @@ void CHistoryCollector::AddBinOpToHistory(int nOpCode, bool isIntegerMode, bool
// This is expected to be called when a binary op in the last say 1+2+ is changing to another one say 1+2* (+ changed to *) // This is expected to be called when a binary op in the last say 1+2+ is changing to another one say 1+2* (+ changed to *)
// It needs to know by this change a Precedence inversion happened. i.e. previous op was lower or equal to its previous op, but the new // It needs to know by this change a Precedence inversion happened. i.e. previous op was lower or equal to its previous op, but the new
// one isn't. (Eg. 1*2* to 1*2^). It can add explicit brackets to ensure the precedence is inverted. (Eg. (1*2) ^) // one isn't. (Eg. 1*2* to 1*2^). It can add explicit brackets to ensure the precedence is inverted. (Eg. (1*2) ^)
void CHistoryCollector::ChangeLastBinOp(int nOpCode, bool fPrecInvToHigher, bool isIntgerMode) void CHistoryCollector::ChangeLastBinOp(int nOpCode, bool fPrecInvToHigher, bool isIntegerMode)
{ {
TruncateEquationSzFromIch(m_lastBinOpStartIndex); TruncateEquationSzFromIch(m_lastBinOpStartIndex);
if (fPrecInvToHigher) if (fPrecInvToHigher)
{ {
EnclosePrecInversionBrackets(); EnclosePrecInversionBrackets();
} }
AddBinOpToHistory(nOpCode, isIntgerMode); AddBinOpToHistory(nOpCode, isIntegerMode);
} }
void CHistoryCollector::PushLastOpndStart(int ichOpndStart) void CHistoryCollector::PushLastOpndStart(int ichOpndStart)

View file

@ -776,7 +776,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam)
break; break;
case IDC_FE: case IDC_FE:
// Toggle exponential notation display. // Toggle exponential notation display.
m_nFE = NumberFormat(!(int)m_nFE); m_nFE = m_nFE == NumberFormat::Float ? NumberFormat::Scientific : NumberFormat::Float;
DisplayNum(); DisplayNum();
break; break;

View file

@ -21,8 +21,8 @@ public:
~CHistoryCollector(); ~CHistoryCollector();
void AddOpndToHistory(std::wstring_view numStr, CalcEngine::Rational const& rat, bool fRepetition = false); void AddOpndToHistory(std::wstring_view numStr, CalcEngine::Rational const& rat, bool fRepetition = false);
void RemoveLastOpndFromHistory(); void RemoveLastOpndFromHistory();
void AddBinOpToHistory(int nOpCode, bool isIntgerMode, bool fNoRepetition = true); void AddBinOpToHistory(int nOpCode, bool isIntegerMode, bool fNoRepetition = true);
void ChangeLastBinOp(int nOpCode, bool fPrecInvToHigher, bool isIntgerMode); void ChangeLastBinOp(int nOpCode, bool fPrecInvToHigher, bool isIntegerMode);
void AddUnaryOpToHistory(int nOpCode, bool fInv, AngleType angletype); void AddUnaryOpToHistory(int nOpCode, bool fInv, AngleType angletype);
void AddOpenBraceToHistory(); void AddOpenBraceToHistory();
void AddCloseBraceToHistory(); void AddCloseBraceToHistory();