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
@ -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…
Reference in New Issue
Block a user