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

Merge pull request #105700 from dementive/config-file-get-improvement

Improve ConfigFile get_sections and get_section_keys by returning Vector<String>
This commit is contained in:
Thaddeus Crews
2025-04-27 19:21:31 -05:00
20 changed files with 58 additions and 105 deletions

View File

@@ -569,8 +569,7 @@ void ScriptEditor::_clear_breakpoints() {
}
// Clear from closed scripts.
List<String> cached_editors;
script_editor_cache->get_sections(&cached_editors);
Vector<String> cached_editors = script_editor_cache->get_sections();
for (const String &E : cached_editors) {
Array breakpoints = _get_cached_breakpoints_for_script(E);
for (int breakpoint : breakpoints) {
@@ -1872,8 +1871,7 @@ Vector<String> ScriptEditor::_get_breakpoints() {
}
// Load breakpoints that are in closed scripts.
List<String> cached_editors;
script_editor_cache->get_sections(&cached_editors);
Vector<String> cached_editors = script_editor_cache->get_sections();
for (const String &E : cached_editors) {
if (loaded_scripts.has(E)) {
continue;
@@ -1913,8 +1911,7 @@ void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
}
// Load breakpoints that are in closed scripts.
List<String> cached_editors;
script_editor_cache->get_sections(&cached_editors);
Vector<String> cached_editors = script_editor_cache->get_sections();
for (const String &E : cached_editors) {
if (loaded_scripts.has(E)) {
continue;
@@ -3547,8 +3544,7 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
// Remove any deleted editors that have been removed between launches.
// and if a Script, register breakpoints with the debugger.
List<String> cached_editors;
script_editor_cache->get_sections(&cached_editors);
Vector<String> cached_editors = script_editor_cache->get_sections();
for (const String &E : cached_editors) {
if (loaded_scripts.has(E)) {
continue;