COMMON: Add ConfigFile::addSection function.

This commit is contained in:
Alyssa Milburn 2013-04-19 00:20:46 +02:00
parent d7a4a12b67
commit ace04a92a2
2 changed files with 10 additions and 0 deletions

View file

@ -226,6 +226,15 @@ bool ConfigFile::saveToStream(WriteStream &stream) {
return !stream.err();
}
void ConfigFile::addSection(const String &section) {
Section *s = getSection(section);
if (s)
return;
Section newSection;
newSection.name = section;
_sections.push_back(newSection);
}
void ConfigFile::removeSection(const String &section) {
assert(isValidName(section));