diff --git a/Source/Core/Common/Config/Layer.h b/Source/Core/Common/Config/Layer.h index 4fabb3dc81..2e84d6c3d1 100644 --- a/Source/Core/Common/Config/Layer.h +++ b/Source/Core/Common/Config/Layer.h @@ -120,13 +120,17 @@ public: template void Set(const ConfigInfo& config_info, const std::common_type_t& value) { - Set(config_info.location, value); + Set(config_info.location, value); } template void Set(const ConfigLocation& location, const T& value) { - const std::string new_value = ValueToString(value); + Set(location, ValueToString(value)); + } + + void Set(const ConfigLocation& location, const std::string& new_value) + { std::optional& current_value = m_map[location]; if (current_value == new_value) return; diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 372ea06c19..c2a5a62b2d 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -332,11 +332,6 @@ std::string ValueToString(bool value) return value ? "True" : "False"; } -std::string ValueToString(const std::string& value) -{ - return value; -} - bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _pFilename, std::string* _pExtension) { diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h index c548b0e87c..11c873bdae 100644 --- a/Source/Core/Common/StringUtil.h +++ b/Source/Core/Common/StringUtil.h @@ -90,7 +90,6 @@ std::string ValueToString(double value); std::string ValueToString(int value); std::string ValueToString(s64 value); std::string ValueToString(bool value); -std::string ValueToString(const std::string& value); template ::value>* = nullptr> std::string ValueToString(T value) {