COMMON: Add ConfigFile::addSection function.
This commit is contained in:
parent
d7a4a12b67
commit
ace04a92a2
2 changed files with 10 additions and 0 deletions
|
@ -226,6 +226,15 @@ bool ConfigFile::saveToStream(WriteStream &stream) {
|
|||
return !stream.err();
|
||||
}
|
||||
|
||||
void ConfigFile::addSection(const String §ion) {
|
||||
Section *s = getSection(section);
|
||||
if (s)
|
||||
return;
|
||||
|
||||
Section newSection;
|
||||
newSection.name = section;
|
||||
_sections.push_back(newSection);
|
||||
}
|
||||
|
||||
void ConfigFile::removeSection(const String §ion) {
|
||||
assert(isValidName(section));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue