mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Remove redundant Config prefix from ConfigInfo/ConfigLocation
Both structs are already in the Config namespace.
This commit is contained in:
@ -37,10 +37,10 @@ void ClearCurrentRunLayer();
|
||||
const std::string& GetSystemName(System system);
|
||||
std::optional<System> GetSystemFromName(const std::string& system);
|
||||
const std::string& GetLayerName(LayerType layer);
|
||||
LayerType GetActiveLayerForConfig(const ConfigLocation&);
|
||||
LayerType GetActiveLayerForConfig(const Location&);
|
||||
|
||||
template <typename T>
|
||||
T Get(LayerType layer, const ConfigInfo<T>& info)
|
||||
T Get(LayerType layer, const Info<T>& info)
|
||||
{
|
||||
if (layer == LayerType::Meta)
|
||||
return Get(info);
|
||||
@ -48,44 +48,44 @@ T Get(LayerType layer, const ConfigInfo<T>& info)
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T Get(const ConfigInfo<T>& info)
|
||||
T Get(const Info<T>& info)
|
||||
{
|
||||
return GetLayer(GetActiveLayerForConfig(info.location))->Get(info);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T GetBase(const ConfigInfo<T>& info)
|
||||
T GetBase(const Info<T>& info)
|
||||
{
|
||||
return Get(LayerType::Base, info);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
LayerType GetActiveLayerForConfig(const ConfigInfo<T>& info)
|
||||
LayerType GetActiveLayerForConfig(const Info<T>& info)
|
||||
{
|
||||
return GetActiveLayerForConfig(info.location);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Set(LayerType layer, const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void Set(LayerType layer, const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
GetLayer(layer)->Set(info, value);
|
||||
InvokeConfigChangedCallbacks();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void SetBase(const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void SetBase(const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
Set<T>(LayerType::Base, info, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void SetCurrent(const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void SetCurrent(const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
Set<T>(LayerType::CurrentRun, info, value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void SetBaseOrCurrent(const ConfigInfo<T>& info, const std::common_type_t<T>& value)
|
||||
void SetBaseOrCurrent(const Info<T>& info, const std::common_type_t<T>& value)
|
||||
{
|
||||
if (GetActiveLayerForConfig(info) == LayerType::Base)
|
||||
Set<T>(LayerType::Base, info, value);
|
||||
|
Reference in New Issue
Block a user