diff --git a/src/CalcManager/CalculatorHistory.cpp b/src/CalcManager/CalculatorHistory.cpp index a34ca272..1c1f7b0d 100644 --- a/src/CalcManager/CalculatorHistory.cpp +++ b/src/CalcManager/CalculatorHistory.cpp @@ -35,16 +35,13 @@ unsigned int CalculatorHistory::AddToHistory(_In_ shared_ptr const &spHistoryItem) { - int lastIndex; - if (m_historyItems.size() >= m_maxHistorySize) { m_historyItems.erase(m_historyItems.begin()); } m_historyItems.push_back(spHistoryItem); - lastIndex = static_cast(m_historyItems.size() - 1); - return lastIndex; + return static_cast(m_historyItems.size() - 1); } bool CalculatorHistory::RemoveItem(_In_ unsigned int uIdx)