diff --git a/src/CalcManager/CEngine/scicomm.cpp b/src/CalcManager/CEngine/scicomm.cpp index 42b70ba..5e3247f 100644 --- a/src/CalcManager/CEngine/scicomm.cpp +++ b/src/CalcManager/CEngine/scicomm.cpp @@ -600,7 +600,7 @@ void CCalcEngine::ProcessCommandWorker(OpCode wParam) // Set the "(=xx" indicator. if (nullptr != m_pCalcDisplay) { - m_pCalcDisplay->SetParenthesisNumber(m_openParenCount >= 0 ? static_cast(m_openParenCount) : 0); + m_pCalcDisplay->SetParenthesisNumber(static_cast(m_openParenCount)); } if (!m_bError) diff --git a/src/CalcManager/CalculatorHistory.cpp b/src/CalcManager/CalculatorHistory.cpp index 467cd42..c40d229 100644 --- a/src/CalcManager/CalculatorHistory.cpp +++ b/src/CalcManager/CalculatorHistory.cpp @@ -79,7 +79,7 @@ vector> const& CalculatorHistory::GetHistory() shared_ptr const& CalculatorHistory::GetHistoryItem(unsigned int uIdx) { - assert(uIdx >= 0 && uIdx < m_historyItems.size()); + assert(uIdx < m_historyItems.size()); return m_historyItems.at(uIdx); }