mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #100057 from aaronp64/container_validate_obj_perf
Improve `ContainerTypeValidate` performance for object types
This commit is contained in:
commit
5fec9a9fdc
1 changed files with 2 additions and 2 deletions
|
|
@ -129,9 +129,9 @@ struct ContainerTypeValidate {
|
|||
return true; // All good, no class type requested.
|
||||
}
|
||||
|
||||
StringName obj_class = object->get_class_name();
|
||||
const StringName &obj_class = object->get_class_name();
|
||||
if (obj_class != class_name) {
|
||||
ERR_FAIL_COND_V_MSG(!ClassDB::is_parent_class(object->get_class_name(), class_name), false, vformat("Attempted to %s an object of type '%s' into a %s, which does not inherit from '%s'.", String(p_operation), object->get_class(), where, String(class_name)));
|
||||
ERR_FAIL_COND_V_MSG(!ClassDB::is_parent_class(obj_class, class_name), false, vformat("Attempted to %s an object of type '%s' into a %s, which does not inherit from '%s'.", String(p_operation), object->get_class(), where, String(class_name)));
|
||||
}
|
||||
|
||||
if (script.is_null()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue