Merge pull request #5397 from MerryMage/do-not-cast-derived-to-base

Config/Layer: Fix accidental cast of RecursiveSection to Section
This commit is contained in:
Leo Lam
2017-05-09 23:27:46 +02:00
committed by GitHub
4 changed files with 14 additions and 14 deletions

View File

@ -73,8 +73,8 @@ public:
for (const auto& section : system.second)
{
const std::string section_name = section.GetName();
const Config::SectionValueMap& section_values = section.GetValues();
const std::string section_name = section->GetName();
const Config::SectionValueMap& section_values = section->GetValues();
IniFile::Section* ini_section = ini.GetOrCreateSection(section_name);

View File

@ -391,10 +391,10 @@ void INIGameConfigLayerLoader::Save(Config::Layer* config_layer)
{
for (const auto& section : system.second)
{
for (const auto& value : section.GetValues())
for (const auto& value : section->GetValues())
{
const auto ini_location =
GetINILocationFromConfig({system.first, section.GetName(), value.first});
GetINILocationFromConfig({system.first, section->GetName(), value.first});
if (ini_location.first.empty() && ini_location.second.empty())
continue;