summaryrefslogtreecommitdiff
path: root/core/io/config_file.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-03-22 21:35:22 +0100
committerGitHub <noreply@github.com>2021-03-22 21:35:22 +0100
commita7fb5f8558d69e4f2e66afc2e32174e501c67555 (patch)
treeb790ff16dcf7a07d879442fd0916a601c12a058c /core/io/config_file.cpp
parent3334a53ac37ea1443adb1ebc03a1a60d82cbbef0 (diff)
parent8d64f3bd76b251ee33a8b2b4b3b53e7e3c44eafb (diff)
Merge pull request #47268 from reduz/keep-import-mode
Add a "keep" import mode to keep files as-is and export them.
Diffstat (limited to 'core/io/config_file.cpp')
-rw-r--r--core/io/config_file.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 015c1f0d90..10f68f3cef 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -295,6 +295,9 @@ Error ConfigFile::_parse(const String &p_path, VariantParser::Stream *p_stream)
return OK;
}
+void ConfigFile::clear() {
+ values.clear();
+}
void ConfigFile::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_value", "section", "key", "value"), &ConfigFile::set_value);
ClassDB::bind_method(D_METHOD("get_value", "section", "key", "default"), &ConfigFile::get_value, DEFVAL(Variant()));
@@ -317,4 +320,6 @@ void ConfigFile::_bind_methods() {
ClassDB::bind_method(D_METHOD("save_encrypted", "path", "key"), &ConfigFile::save_encrypted);
ClassDB::bind_method(D_METHOD("save_encrypted_pass", "path", "password"), &ConfigFile::save_encrypted_pass);
+
+ ClassDB::bind_method(D_METHOD("clear"), &ConfigFile::clear);
}