mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-19 21:03:11 -07:00
Drop non-negative tests on unsigned values (#1729)
As some of the variables are of unsigned types, it makes no sense to test them for non-negativeness, as this is enforced by type already.
This commit is contained in:
parent
441bf39c0b
commit
d428a768e0
2 changed files with 2 additions and 2 deletions
|
@ -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<unsigned int>(m_openParenCount) : 0);
|
||||
m_pCalcDisplay->SetParenthesisNumber(static_cast<unsigned int>(m_openParenCount));
|
||||
}
|
||||
|
||||
if (!m_bError)
|
||||
|
|
|
@ -79,7 +79,7 @@ vector<shared_ptr<HISTORYITEM>> const& CalculatorHistory::GetHistory()
|
|||
|
||||
shared_ptr<HISTORYITEM> const& CalculatorHistory::GetHistoryItem(unsigned int uIdx)
|
||||
{
|
||||
assert(uIdx >= 0 && uIdx < m_historyItems.size());
|
||||
assert(uIdx < m_historyItems.size());
|
||||
return m_historyItems.at(uIdx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue