GDScript: Remove unnecessary name check in _get_property_list()
This commit is contained in:
parent
95f561dc30
commit
84c8946565
@ -1747,11 +1747,10 @@ void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const
|
|||||||
Dictionary d = arr[i];
|
Dictionary d = arr[i];
|
||||||
ERR_CONTINUE(!d.has("name"));
|
ERR_CONTINUE(!d.has("name"));
|
||||||
ERR_CONTINUE(!d.has("type"));
|
ERR_CONTINUE(!d.has("type"));
|
||||||
|
|
||||||
PropertyInfo pinfo;
|
PropertyInfo pinfo;
|
||||||
pinfo.type = Variant::Type(d["type"].operator int());
|
|
||||||
ERR_CONTINUE(pinfo.type < 0 || pinfo.type >= Variant::VARIANT_MAX);
|
|
||||||
pinfo.name = d["name"];
|
pinfo.name = d["name"];
|
||||||
ERR_CONTINUE(pinfo.name.is_empty());
|
pinfo.type = Variant::Type(d["type"].operator int());
|
||||||
if (d.has("hint")) {
|
if (d.has("hint")) {
|
||||||
pinfo.hint = PropertyHint(d["hint"].operator int());
|
pinfo.hint = PropertyHint(d["hint"].operator int());
|
||||||
}
|
}
|
||||||
@ -1765,6 +1764,9 @@ void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const
|
|||||||
pinfo.class_name = d["class_name"];
|
pinfo.class_name = d["class_name"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ERR_CONTINUE(pinfo.name.is_empty() && (pinfo.usage & PROPERTY_USAGE_STORAGE));
|
||||||
|
ERR_CONTINUE(pinfo.type < 0 || pinfo.type >= Variant::VARIANT_MAX);
|
||||||
|
|
||||||
props.push_back(pinfo);
|
props.push_back(pinfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user