diff --git a/src/CalcManager/CalculatorHistory.cpp b/src/CalcManager/CalculatorHistory.cpp index 1c1f7b0d..886ff434 100644 --- a/src/CalcManager/CalculatorHistory.cpp +++ b/src/CalcManager/CalculatorHistory.cpp @@ -41,7 +41,8 @@ unsigned int CalculatorHistory::AddItem(_In_ shared_ptr const &spHi } m_historyItems.push_back(spHistoryItem); - return static_cast(m_historyItems.size() - 1); +unsigned int lastIndex = static_cast(m_historyItems.size() - 1); +return lastIndex; } bool CalculatorHistory::RemoveItem(_In_ unsigned int uIdx)