mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-27 20:56:25 +00:00
Turn Config::Info into a class with getters
This commit is contained in:
parent
11e8783893
commit
b285991b88
12 changed files with 62 additions and 53 deletions
|
@ -45,7 +45,7 @@ inline std::optional<std::string> TryParse(const std::string& str_value)
|
|||
} // namespace detail
|
||||
|
||||
template <typename T>
|
||||
struct Info;
|
||||
class Info;
|
||||
|
||||
class Layer;
|
||||
using LayerMap = std::map<Location, std::optional<std::string>>;
|
||||
|
@ -105,7 +105,7 @@ public:
|
|||
template <typename T>
|
||||
T Get(const Info<T>& config_info) const
|
||||
{
|
||||
return Get<T>(config_info.location).value_or(config_info.default_value);
|
||||
return Get<T>(config_info.GetLocation()).value_or(config_info.GetDefaultValue());
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
@ -120,7 +120,7 @@ public:
|
|||
template <typename T>
|
||||
void Set(const Info<T>& config_info, const std::common_type_t<T>& value)
|
||||
{
|
||||
Set(config_info.location, value);
|
||||
Set(config_info.GetLocation(), value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue