Remove unnecessary SetValue method

This commit is contained in:
Hongxu Xu 2020-11-19 12:34:11 +08:00
commit 422ee08903
4 changed files with 0 additions and 15 deletions

View file

@ -196,13 +196,6 @@ bool UnitConversionManager::UnitConverter::IsSwitchedActive() const
return m_switchedActive;
}
void UnitConversionManager::UnitConverter::SetValue(const std::wstring& newValue)
{
m_returnDisplay = m_currentDisplay;
m_currentDisplay = newValue;
m_currentHasDecimal = (m_currentDisplay.find(L'.') != wstring::npos);
}
wstring UnitConverter::CategoryToString(const Category& c, wstring_view delimiter)
{
return Quote(std::to_wstring(c.id))

View file

@ -224,7 +224,6 @@ namespace UnitConversionManager
virtual void SetCurrentUnitTypes(const Unit& fromType, const Unit& toType) = 0;
virtual void SwitchActive(const std::wstring& newValue) = 0;
virtual bool IsSwitchedActive() const = 0;
virtual void SetValue(const std::wstring& newValue) = 0;
virtual std::wstring SaveUserPreferences() = 0;
virtual void RestoreUserPreferences(_In_ std::wstring_view userPreferences) = 0;
virtual void SendCommand(Command command) = 0;
@ -249,7 +248,6 @@ namespace UnitConversionManager
void SetCurrentUnitTypes(const Unit& fromType, const Unit& toType) override;
void SwitchActive(const std::wstring& newValue) override;
bool IsSwitchedActive() const override;
void SetValue(const std::wstring& newValue) override;
std::wstring SaveUserPreferences() override;
void RestoreUserPreferences(std::wstring_view userPreference) override;
void SendCommand(Command command) override;

View file

@ -225,11 +225,6 @@ bool UnitConverterMock::IsSwitchedActive() const
return false;
}
void UnitConverterMock::SetValue(const std::wstring& newValue)
{
m_curValue = newValue;
}
std::wstring UnitConverterMock::SaveUserPreferences()
{
return L"TEST";

View file

@ -40,7 +40,6 @@ namespace CalculatorUnitTests
void SetCurrentUnitTypes(const UCM::Unit& fromType, const UCM::Unit& toType) override;
void SwitchActive(const std::wstring& newValue) override;
bool IsSwitchedActive() const override;
void SetValue(const std::wstring& newValue) override;
std::wstring SaveUserPreferences() override;
void RestoreUserPreferences(_In_ std::wstring_view userPreferences) override;
void SendCommand(UCM::Command command) override;