update ConfigIni::Save
This commit is contained in:
parent
a62f1f4d2d
commit
7f902e3343
|
|
@ -158,16 +158,20 @@ bool ConfigIni::Save(std::ostream& os)
|
||||||
std::sort(keys.begin(), keys.end());
|
std::sort(keys.begin(), keys.end());
|
||||||
|
|
||||||
// Output to ini
|
// Output to ini
|
||||||
for (const auto& key : keys)
|
std::ostream::sentry ok(os);
|
||||||
|
if (ok)
|
||||||
{
|
{
|
||||||
os << '[' << key << ']' << std::endl;
|
for (const auto& key : keys)
|
||||||
for (const auto& pair : sections_[key])
|
|
||||||
{
|
{
|
||||||
os << pair.first << " = " << pair.second << std::endl;
|
os << '[' << key << ']' << std::endl;
|
||||||
|
for (const auto& pair : sections_[key])
|
||||||
|
{
|
||||||
|
os << pair.first << " = " << pair.second << std::endl;
|
||||||
|
}
|
||||||
|
os << std::endl;
|
||||||
}
|
}
|
||||||
os << std::endl;
|
|
||||||
}
|
}
|
||||||
return false;
|
return !os.fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigIni::SectionMap ConfigIni::GetSectionMap() const
|
ConfigIni::SectionMap ConfigIni::GetSectionMap() const
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue