You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Use const references where possible for List range iterators
This commit is contained in:
@@ -447,7 +447,7 @@ Variant CreateDialog::instance_selected() {
|
||||
List<PropertyInfo> pinfo;
|
||||
((Object *)obj)->get_property_list(&pinfo);
|
||||
|
||||
for (PropertyInfo &pi : pinfo) {
|
||||
for (const 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);
|
||||
|
||||
Reference in New Issue
Block a user