summaryrefslogtreecommitdiff
path: root/Source/Core/UICommon/CommandLineParse.cpp
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2017-10-29 19:11:15 +0000
committerMerryMage <MerryMage@users.noreply.github.com>2017-11-15 18:04:40 +0000
commit4c24629b9551cab8af653a2bbcbe6d1639b3edb2 (patch)
tree95f17ded4d887ad4df99463e49078c5de0377aa4 /Source/Core/UICommon/CommandLineParse.cpp
parentf3b52c07d74d528a81c818d86c12981a6028f351 (diff)
Config: Flatten structures
Originally, Layer contained a std::map of Sections, which containted a std::map containing the (key, value) pairs. Here we flattern this structure so that only one std::map is required, reducing the number of indirections required and vastly simplifying the code.
Diffstat (limited to 'Source/Core/UICommon/CommandLineParse.cpp')
-rw-r--r--Source/Core/UICommon/CommandLineParse.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/UICommon/CommandLineParse.cpp b/Source/Core/UICommon/CommandLineParse.cpp
index cf47bd8a5c..236cd86ba2 100644
--- a/Source/Core/UICommon/CommandLineParse.cpp
+++ b/Source/Core/UICommon/CommandLineParse.cpp
@@ -45,18 +45,15 @@ public:
}
}
- void Load(Config::Layer* config_layer) override
+ void Load(Config::Layer* layer) override
{
for (auto& value : m_values)
{
- const Config::ConfigLocation location = std::get<0>(value);
- Config::Section* section =
- config_layer->GetOrCreateSection(location.system, location.section);
- section->Set(location.key, std::get<1>(value));
+ layer->Set(std::get<0>(value), std::get<1>(value));
}
}
- void Save(Config::Layer* config_layer) override
+ void Save(Config::Layer* layer) override
{
// Save Nothing
}