mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Using iterator pattern instead of List::Element *.
Co-authored-by: Adam Scott <ascott.ca@gmail.com>
This commit is contained in:
parent
594d64ec24
commit
22b5ec17fb
36 changed files with 150 additions and 173 deletions
|
|
@ -598,8 +598,7 @@ void EditorData::instantiate_object_properties(Object *p_object) {
|
|||
List<PropertyInfo> pinfo;
|
||||
p_object->get_property_list(&pinfo);
|
||||
|
||||
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
|
||||
PropertyInfo pi = E->get();
|
||||
for (const PropertyInfo &pi : pinfo) {
|
||||
if (pi.type == Variant::OBJECT && pi.usage & PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT) {
|
||||
Object *prop = ClassDB::instantiate(pi.class_name);
|
||||
p_object->set(pi.name, prop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue