mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #76560 from aaronfranke/node-set-string-name
Change Node `set_name` to use StringName, slightly improves performance
This commit is contained in:
@@ -359,11 +359,7 @@ void validate_property(const Context &p_context, const ExposedClass &p_class, co
|
||||
if (getter && setter) {
|
||||
const ArgumentData &setter_first_arg = setter->arguments.back()->get();
|
||||
if (getter->return_type.name != setter_first_arg.type.name) {
|
||||
// Special case for Node::set_name
|
||||
bool whitelisted = getter->return_type.name == p_context.names_cache.string_name_type &&
|
||||
setter_first_arg.type.name == p_context.names_cache.string_type;
|
||||
|
||||
TEST_FAIL_COND(!whitelisted,
|
||||
TEST_FAIL(
|
||||
"Return type from getter doesn't match first argument of setter, for property: '", p_class.name, ".", String(p_prop.name), "'.");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user