1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

Optimize ClassDB::get_direct_inheriters_from_class.

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
This commit is contained in:
Yufeng Ying
2025-03-19 17:05:10 +08:00
parent ef1153baf3
commit c37c92b450

View File

@@ -298,7 +298,7 @@ void ClassDB::get_direct_inheriters_from_class(const StringName &p_class, List<S
OBJTYPE_RLOCK;
for (const KeyValue<StringName, ClassInfo> &E : classes) {
if (E.key != p_class && _get_parent_class(E.key) == p_class) {
if (E.value.inherits == p_class) {
p_classes->push_back(E.key);
}
}