Config/Layer: Allow all keys of a section to be iterated over

This commit is contained in:
MerryMage
2017-10-30 18:10:05 +00:00
parent 4c24629b95
commit 37419b9a57
2 changed files with 39 additions and 0 deletions

View File

@ -98,6 +98,18 @@ void Layer::DeleteAllKeys()
}
}
Section Layer::GetSection(System system, const std::string& section)
{
return Section{m_map.lower_bound(ConfigLocation{system, section, ""}),
m_map.lower_bound(ConfigLocation{system, section + '\001', ""})};
}
ConstSection Layer::GetSection(System system, const std::string& section) const
{
return ConstSection{m_map.lower_bound(ConfigLocation{system, section, ""}),
m_map.lower_bound(ConfigLocation{system, section + '\001', ""})};
}
void Layer::Load()
{
if (m_loader)