diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-24 15:46:25 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-25 12:22:25 +0200 |
commit | ac3322b0af8f23e8e2dac8111200bc69b5604c9f (patch) | |
tree | 59a079f13b5c03c2dd3328a26c55f3618e6014f6 /editor/editor_inspector.cpp | |
parent | a0f7f42b842462646281f5c4c9a8db070e034adc (diff) | |
download | redot-engine-ac3322b0af8f23e8e2dac8111200bc69b5604c9f.tar.gz |
Use const references where possible for List range iterators
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r-- | editor/editor_inspector.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 9a0dd4e3bc..ff34e2c93d 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -1508,7 +1508,7 @@ String EditorInspector::get_selected_path() const { } void EditorInspector::_parse_added_editors(VBoxContainer *current_vbox, Ref<EditorInspectorPlugin> ped) { - for (EditorInspectorPlugin::AddedEditor &F : ped->added_editors) { + for (const EditorInspectorPlugin::AddedEditor &F : ped->added_editors) { EditorProperty *ep = Object::cast_to<EditorProperty>(F.property_editor); current_vbox->add_child(F.property_editor); @@ -1952,7 +1952,7 @@ void EditorInspector::update_tree() { List<EditorInspectorPlugin::AddedEditor> editors = ped->added_editors; //make a copy, since plugins may be used again in a sub-inspector ped->added_editors.clear(); - for (EditorInspectorPlugin::AddedEditor &F : editors) { + for (const EditorInspectorPlugin::AddedEditor &F : editors) { EditorProperty *ep = Object::cast_to<EditorProperty>(F.property_editor); if (ep) { @@ -2391,7 +2391,7 @@ void EditorInspector::_property_checked(const String &p_path, bool p_checked) { Variant to_create; List<PropertyInfo> pinfo; object->get_property_list(&pinfo); - for (PropertyInfo &E : pinfo) { + for (const PropertyInfo &E : pinfo) { if (E.name == p_path) { Callable::CallError ce; Variant::construct(E.type, to_create, nullptr, 0, ce); |