1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Change ClassDB::get_class_list and related stuff.

This commit is contained in:
Yufeng Ying
2025-01-08 20:01:55 +08:00
parent 99a39ce6ea
commit a50fc5acd8
23 changed files with 155 additions and 150 deletions

View File

@@ -1545,14 +1545,16 @@ namespace Special {
////// ClassDB //////
PackedStringArray ClassDB::get_class_list() const {
List<StringName> classes;
::ClassDB::get_class_list(&classes);
LocalVector<StringName> 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;