aboutsummaryrefslogtreecommitdiff
path: root/common/config-file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/config-file.cpp')
-rw-r--r--common/config-file.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/common/config-file.cpp b/common/config-file.cpp
index 4224d7491d..0ce6dcf0c8 100644
--- a/common/config-file.cpp
+++ b/common/config-file.cpp
@@ -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));
@@ -380,4 +389,4 @@ void ConfigFile::Section::removeKey(const String &key) {
}
}
-} // End of namespace Common
+} // End of namespace Common