1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Improve ConfigFile get_sections and get_section_keys by returning Vector<String>

This commit is contained in:
dementive
2025-04-23 23:32:05 -04:00
parent 931820d33c
commit b8e44a0000
20 changed files with 58 additions and 105 deletions

View File

@@ -1648,8 +1648,7 @@ void EditorNode::_load_editor_plugin_states_from_config(const Ref<ConfigFile> &p
return;
}
List<String> esl;
p_config_file->get_section_keys("editor_states", &esl);
Vector<String> esl = p_config_file->get_section_keys("editor_states");
Dictionary md;
for (const String &E : esl) {
@@ -2378,8 +2377,7 @@ void EditorNode::_dialog_action(String p_file) {
}
// Erase key values.
List<String> keys;
config->get_section_keys(p_file, &keys);
Vector<String> keys = config->get_section_keys(p_file);
for (const String &key : keys) {
config->set_value(p_file, key, Variant());
}
@@ -5777,8 +5775,7 @@ void EditorNode::_update_layouts_menu() {
return; // No config.
}
List<String> layouts;
config.ptr()->get_sections(&layouts);
Vector<String> layouts = config->get_sections();
for (const String &layout : layouts) {
if (layout == TTR("Default")) {