diff --git a/core/core_bind.cpp b/core/core_bind.cpp index f58556468ac..fc7fb4a20e7 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -1545,14 +1545,16 @@ namespace Special { ////// ClassDB ////// PackedStringArray ClassDB::get_class_list() const { - List classes; - ::ClassDB::get_class_list(&classes); + LocalVector classes; + ::ClassDB::get_class_list(classes); PackedStringArray ret; ret.resize(classes.size()); + String *ptrw = ret.ptrw(); int idx = 0; - for (const StringName &E : classes) { - ret.set(idx++, E); + for (const StringName &cls : classes) { + ptrw[idx] = cls; + idx++; } return ret; diff --git a/core/debugger/remote_debugger.cpp b/core/debugger/remote_debugger.cpp index 76b19a3903a..79fd76bf699 100644 --- a/core/debugger/remote_debugger.cpp +++ b/core/debugger/remote_debugger.cpp @@ -566,25 +566,25 @@ void RemoteDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) { input_vals.append(V); } - List native_types; - ClassDB::get_class_list(&native_types); - for (const StringName &E : native_types) { - if (!ClassDB::is_class_exposed(E) || !Engine::get_singleton()->has_singleton(E) || Engine::get_singleton()->is_singleton_editor_only(E)) { + LocalVector native_types; + ClassDB::get_class_list(native_types); + for (const StringName &class_name : native_types) { + if (!ClassDB::is_class_exposed(class_name) || !Engine::get_singleton()->has_singleton(class_name) || Engine::get_singleton()->is_singleton_editor_only(class_name)) { continue; } - input_names.append(E); - input_vals.append(Engine::get_singleton()->get_singleton_object(E)); + input_names.append(class_name); + input_vals.append(Engine::get_singleton()->get_singleton_object(class_name)); } - List user_types; - ScriptServer::get_global_class_list(&user_types); - for (const StringName &S : user_types) { - String scr_path = ScriptServer::get_global_class_path(S); + LocalVector user_types; + ScriptServer::get_global_class_list(user_types); + for (const StringName &class_name : user_types) { + String scr_path = ScriptServer::get_global_class_path(class_name); Ref