1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +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

@@ -630,8 +630,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) {
@@ -1918,8 +1917,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;
@@ -1959,8 +1957,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;
@@ -3591,8 +3588,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;