Remove dead code from History (#1228)

* Clean history

* clean unit tests

* cleaning

* Remove friend class in HistoryViewModel
This commit is contained in:
Rudy Huyn
2020-05-25 15:02:27 -07:00
committed by GitHub
parent c37f540265
commit 143907f21f
13 changed files with 46 additions and 440 deletions

View File

@@ -554,30 +554,6 @@ namespace CalculationManager
return m_currentDegreeMode;
}
void CalculatorManager::SetHistory(_In_ CalculatorMode eMode, _In_ vector<shared_ptr<HISTORYITEM>> const& history)
{
CalculatorHistory* pHistory = nullptr;
switch (eMode)
{
case CalculatorMode::Standard:
pHistory = m_pStdHistory.get();
break;
case CalculatorMode::Scientific:
pHistory = m_pSciHistory.get();
break;
}
if (pHistory)
{
pHistory->ClearHistory();
for (auto const& historyItem : history)
{
pHistory->AddItem(historyItem);
}
}
}
wstring CalculatorManager::GetResultForRadix(uint32_t radix, int32_t precision, bool groupDigitsPerRadix)
{
return m_currentCalculatorEngine ? m_currentCalculatorEngine->GetCurrentResultForRadix(radix, precision, groupDigitsPerRadix) : L"";

View File

@@ -117,7 +117,6 @@ namespace CalculationManager
return m_pHistory->MaxHistorySize();
}
CalculationManager::Command GetCurrentDegreeMode();
void SetHistory(_In_ CalculatorMode eMode, _In_ std::vector<std::shared_ptr<HISTORYITEM>> const& history);
void SetInHistoryItemLoadMode(_In_ bool isHistoryItemLoadMode);
};
}