diff --git a/src/CalcManager/CalculatorHistory.cpp b/src/CalcManager/CalculatorHistory.cpp index 6b18a8e8..d32bbe07 100644 --- a/src/CalcManager/CalculatorHistory.cpp +++ b/src/CalcManager/CalculatorHistory.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include "pch.h" @@ -7,7 +7,7 @@ using namespace std; using namespace CalculationManager; -CalculatorHistory::CalculatorHistory(CALCULATOR_MODE eMode, size_t maxSize) : +CalculatorHistory::CalculatorHistory(size_t maxSize) : m_mode(eMode), m_maxHistorySize(maxSize) {} diff --git a/src/CalcManager/CalculatorHistory.h b/src/CalcManager/CalculatorHistory.h index c9964029..6a27d266 100644 --- a/src/CalcManager/CalculatorHistory.h +++ b/src/CalcManager/CalculatorHistory.h @@ -31,7 +31,7 @@ namespace CalculationManager { public: - CalculatorHistory(CALCULATOR_MODE eMode, const size_t maxSize); + CalculatorHistory(const size_t maxSize); unsigned int AddToHistory(_In_ std::shared_ptr>> const &spTokens, _In_ std::shared_ptr>> const &spCommands, _In_ std::wstring_view result); std::vector> const& GetHistory(); std::shared_ptr const& GetHistoryItem(_In_ unsigned int uIdx); diff --git a/src/CalcViewModel/Common/Utils.cpp b/src/CalcViewModel/Common/Utils.cpp index 52c2579b..1f024f58 100644 --- a/src/CalcViewModel/Common/Utils.cpp +++ b/src/CalcViewModel/Common/Utils.cpp @@ -80,19 +80,6 @@ void Utils::RunOnUIThreadNonblocking(std::function&& function, _In_ Core } } -// returns if the last character of a wstring is the target wchar_t -bool Utils::IsLastCharacterTarget(_In_ wstring const &input, wchar_t target) -{ - return !input.empty() && input.back() == target; -} - -// Returns wstring after removing characters like space, comma, and double quotes -wstring Utils::RemoveUnwantedCharsFromWstring(wstring input) -{ - wchar_t unWantedChars[] = { L' ', L',', L'"', 8234, 8235, 8236, 8237 }; - return RemoveUnwantedCharsFromWstring(input, unWantedChars, 6); -} - //return wstring after removing characters specified by unwantedChars array wstring Utils::RemoveUnwantedCharsFromWstring(wstring input, _In_reads_(size) wchar_t* unwantedChars, unsigned int size) { diff --git a/src/CalcViewModel/Common/Utils.h b/src/CalcViewModel/Common/Utils.h index f71e53d5..eee37d68 100644 --- a/src/CalcViewModel/Common/Utils.h +++ b/src/CalcViewModel/Common/Utils.h @@ -280,7 +280,6 @@ namespace Utils Platform::String^ GetStringValue(Platform::String^ input); bool IsLastCharacterTarget(_In_ std::wstring const &input, wchar_t target); std::wstring RemoveUnwantedCharsFromWstring(std::wstring inputString, _In_reads_(size) wchar_t* unwantedChars, unsigned int size); - std::wstring RemoveUnwantedCharsFromWstring(std::wstring input); double GetDoubleFromWstring(std::wstring input); int GetWindowId(); void RunOnUIThreadNonblocking(std::function&& function, _In_ Windows::UI::Core::CoreDispatcher^ currentDispatcher);