mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
refactor: redundant local variable
This commit is contained in:
parent
0f615faff9
commit
06665dafde
1 changed files with 1 additions and 4 deletions
|
@ -35,16 +35,13 @@ unsigned int CalculatorHistory::AddToHistory(_In_ shared_ptr<CalculatorVector <p
|
||||||
|
|
||||||
unsigned int CalculatorHistory::AddItem(_In_ shared_ptr<HISTORYITEM> const &spHistoryItem)
|
unsigned int CalculatorHistory::AddItem(_In_ shared_ptr<HISTORYITEM> const &spHistoryItem)
|
||||||
{
|
{
|
||||||
int lastIndex;
|
|
||||||
|
|
||||||
if (m_historyItems.size() >= m_maxHistorySize)
|
if (m_historyItems.size() >= m_maxHistorySize)
|
||||||
{
|
{
|
||||||
m_historyItems.erase(m_historyItems.begin());
|
m_historyItems.erase(m_historyItems.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
m_historyItems.push_back(spHistoryItem);
|
m_historyItems.push_back(spHistoryItem);
|
||||||
lastIndex = static_cast<unsigned>(m_historyItems.size() - 1);
|
return static_cast<unsigned>(m_historyItems.size() - 1);
|
||||||
return lastIndex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CalculatorHistory::RemoveItem(_In_ unsigned int uIdx)
|
bool CalculatorHistory::RemoveItem(_In_ unsigned int uIdx)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue