You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Improve ConfigFile get_sections and get_section_keys by returning Vector<String>
This commit is contained in:
@@ -2585,8 +2585,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
|
||||
}
|
||||
|
||||
if (config->has_section("params")) {
|
||||
List<String> sk;
|
||||
config->get_section_keys("params", &sk);
|
||||
Vector<String> sk = config->get_section_keys("params");
|
||||
for (const String ¶m : sk) {
|
||||
Variant value = config->get_value("params", param);
|
||||
//override with whatever is in file
|
||||
@@ -2769,8 +2768,7 @@ Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap<Strin
|
||||
Error err = cf->load(p_file + ".import");
|
||||
if (err == OK) {
|
||||
if (cf->has_section("params")) {
|
||||
List<String> sk;
|
||||
cf->get_section_keys("params", &sk);
|
||||
Vector<String> sk = cf->get_section_keys("params");
|
||||
for (const String &E : sk) {
|
||||
if (!params.has(E)) {
|
||||
params[E] = cf->get_value("params", E);
|
||||
@@ -3408,8 +3406,7 @@ void EditorFileSystem::_move_group_files(EditorFileSystemDirectory *efd, const S
|
||||
config->set_value("remap", "group_file", p_new_location);
|
||||
}
|
||||
|
||||
List<String> sk;
|
||||
config->get_section_keys("params", &sk);
|
||||
Vector<String> sk = config->get_section_keys("params");
|
||||
for (const String ¶m : sk) {
|
||||
//not very clean, but should work
|
||||
String value = config->get_value("params", param);
|
||||
|
||||
Reference in New Issue
Block a user