Changing CCalcEngine::s_engineStrings to use string_view for keys (#829)
This commit is contained in:
committed by
Matt Cooley
parent
25d7a46ac1
commit
369843dd37
@@ -98,7 +98,7 @@ public:
|
||||
{
|
||||
return s_engineStrings[std::to_wstring(ids)];
|
||||
}
|
||||
static std::wstring_view GetString(std::wstring ids)
|
||||
static std::wstring_view GetString(std::wstring_view ids)
|
||||
{
|
||||
return s_engineStrings[ids];
|
||||
}
|
||||
@@ -161,7 +161,7 @@ private:
|
||||
|
||||
std::array<CalcEngine::Rational, NUM_WIDTH_LENGTH> m_chopNumbers; // word size enforcement
|
||||
std::array<std::wstring, NUM_WIDTH_LENGTH> m_maxDecimalValueStrings; // maximum values represented by a given word width based off m_chopNumbers
|
||||
static std::unordered_map<std::wstring, std::wstring> s_engineStrings; // the string table shared across all instances
|
||||
static std::unordered_map<std::wstring_view, std::wstring> s_engineStrings; // the string table shared across all instances
|
||||
wchar_t m_decimalSeparator;
|
||||
wchar_t m_groupSeparator;
|
||||
|
||||
|
Reference in New Issue
Block a user