From c8f970e2b04709280ef144ff135dac15945d21b2 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Sun, 29 Oct 2017 19:17:58 +0000 Subject: Config: Remove recursive layer --- Source/Core/Common/Config/Layer.cpp | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'Source/Core/Common/Config/Layer.cpp') 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(m_layer, system, section_name)); - } - else - { - m_sections[system].emplace_back(std::make_unique
(m_layer, system, section_name)); - } + m_sections[system].emplace_back(std::make_unique
(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(m_layer, system, section_name)); - section = m_sections[system].back().get(); - } - return section; -} } -- cgit v1.2.3