diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-07-15 23:45:57 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-07-23 17:38:28 -0400 |
commit | 4e6efd1b07f1c6d53d226977ddc729333b74306a (patch) | |
tree | a52f672e7f622bb65e3b65f2a2edc9d19b1ecdcf /editor/create_dialog.cpp | |
parent | b918c4c3ce84af1f8af2d06ef31784f48a15551a (diff) | |
download | redot-engine-4e6efd1b07f1c6d53d226977ddc729333b74306a.tar.gz |
Use C++ iterators for Lists in many situations
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r-- | editor/create_dialog.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index bfbd697409..abe17bf427 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -447,8 +447,7 @@ Variant CreateDialog::instance_selected() { List<PropertyInfo> pinfo; ((Object *)obj)->get_property_list(&pinfo); - for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) { - PropertyInfo pi = E->get(); + for (PropertyInfo &pi : pinfo) { if (pi.type == Variant::OBJECT && pi.usage & PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT) { Object *prop = ClassDB::instantiate(pi.class_name); ((Object *)obj)->set(pi.name, prop); |