mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
Config: Extract layer search order to header
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@ -254,13 +253,7 @@ bool RecursiveSection::Exists(const std::string& key) const
|
||||
bool RecursiveSection::Get(const std::string& key, std::string* value,
|
||||
const std::string& default_value) const
|
||||
{
|
||||
static constexpr std::array<LayerType, 7> search_order = {{
|
||||
// Skip the meta layer
|
||||
LayerType::CurrentRun, LayerType::CommandLine, LayerType::Movie, LayerType::Netplay,
|
||||
LayerType::LocalGame, LayerType::GlobalGame, LayerType::Base,
|
||||
}};
|
||||
|
||||
for (auto layer_id : search_order)
|
||||
for (auto layer_id : SEARCH_ORDER)
|
||||
{
|
||||
auto layers_it = Config::GetLayers()->find(layer_id);
|
||||
if (layers_it == Config::GetLayers()->end())
|
||||
|
Reference in New Issue
Block a user