diff options
| author | MerryMage <MerryMage@users.noreply.github.com> | 2017-05-18 13:53:52 +0100 |
|---|---|---|
| committer | MerryMage <MerryMage@users.noreply.github.com> | 2017-06-03 18:11:56 +0100 |
| commit | 6151bc1714e16e55116fc69930d365921b43f1b7 (patch) | |
| tree | 0c68c8b6d0f5af1a17fcc3f596bad934a10439ec /Source/Core/Common/Config/Section.cpp | |
| parent | 57264022ce20a234e6dbbaa564bf0f48177afcdb (diff) | |
Config: Extract layer search order to header
Diffstat (limited to 'Source/Core/Common/Config/Section.cpp')
| -rw-r--r-- | Source/Core/Common/Config/Section.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Source/Core/Common/Config/Section.cpp b/Source/Core/Common/Config/Section.cpp index 5c7f52eb63..ac6741416a 100644 --- a/Source/Core/Common/Config/Section.cpp +++ b/Source/Core/Common/Config/Section.cpp @@ -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()) |
