diff options
| author | MerryMage <MerryMage@users.noreply.github.com> | 2017-10-29 19:17:58 +0000 |
|---|---|---|
| committer | MerryMage <MerryMage@users.noreply.github.com> | 2017-11-15 18:04:40 +0000 |
| commit | c8f970e2b04709280ef144ff135dac15945d21b2 (patch) | |
| tree | 830d4e96b9aba0101d2453f81deaa1cd327f4094 /Source/Core/Common/Config/Layer.cpp | |
| parent | f612569718f9114af98c9454da8ee2fd44f2b5c3 (diff) | |
Config: Remove recursive layer
Diffstat (limited to 'Source/Core/Common/Config/Layer.cpp')
| -rw-r--r-- | Source/Core/Common/Config/Layer.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/Source/Core/Common/Config/Layer.cpp b/Source/Core/Common/Config/Layer.cpp index b613c4366b..a3912281f5 100644 --- a/Source/Core/Common/Config/Layer.cpp +++ b/Source/Core/Common/Config/Layer.cpp @@ -67,15 +67,7 @@ Section* Layer::GetOrCreateSection(System system, const std::string& section_nam Section* section = GetSection(system, section_name); if (!section) { - if (m_layer == LayerType::Meta) - { - m_sections[system].emplace_back( - std::make_unique<RecursiveSection>(m_layer, system, section_name)); - } - else - { - m_sections[system].emplace_back(std::make_unique<Section>(m_layer, system, section_name)); - } + m_sections[system].emplace_back(std::make_unique<Section>(m_layer, system, section_name)); section = m_sections[system].back().get(); } return section; @@ -124,26 +116,4 @@ void Layer::ClearDirty() [](auto& section) { section->ClearDirty(); }); }); } - -RecursiveLayer::RecursiveLayer() : Layer(LayerType::Meta) -{ -} - -Section* RecursiveLayer::GetSection(System system, const std::string& section_name) -{ - // Always queries backwards recursively, so it doesn't matter if it exists or not on this layer - return GetOrCreateSection(system, section_name); -} - -Section* RecursiveLayer::GetOrCreateSection(System system, const std::string& section_name) -{ - Section* section = Layer::GetSection(system, section_name); - if (!section) - { - m_sections[system].emplace_back( - std::make_unique<RecursiveSection>(m_layer, system, section_name)); - section = m_sections[system].back().get(); - } - return section; -} } |
