mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Change Node set_name to use StringName
This commit is contained in:
parent
730adf4801
commit
a404b668a1
6 changed files with 69 additions and 17 deletions
|
|
@ -2732,11 +2732,7 @@ Error BindingsGenerator::_generate_cs_property(const BindingsGenerator::TypeInte
|
|||
if (getter && setter) {
|
||||
const ArgumentInterface &setter_first_arg = setter->arguments.back()->get();
|
||||
if (getter->return_type.cname != setter_first_arg.type.cname) {
|
||||
// Special case for Node::set_name
|
||||
bool whitelisted = getter->return_type.cname == name_cache.type_StringName &&
|
||||
setter_first_arg.type.cname == name_cache.type_String;
|
||||
|
||||
ERR_FAIL_COND_V_MSG(!whitelisted, ERR_BUG,
|
||||
ERR_FAIL_V_MSG(ERR_BUG,
|
||||
"Return type from getter doesn't match first argument of setter for property: '" +
|
||||
p_itype.name + "." + String(p_iprop.cname) + "'.");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue