diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-26 17:50:35 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-26 19:27:11 +0200 |
commit | 92299989bd10fd9855b6d77bc2bfabae218d1eea (patch) | |
tree | 7102f96ac3722e82c2cae7ad8bd4a5b5e7961989 /editor/plugins | |
parent | fef27e9b5b9b125ff535513c80b45953e8717f7d (diff) |
Use Ref<T> references as iterators where relevant
And const when possible.
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/sprite_frames_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/theme_editor_plugin.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index a5d0ebbc12..42f7d23da2 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -365,7 +365,7 @@ void SpriteFramesEditor::_file_load_request(const Vector<String> &p_path, int p_ int count = 0; - for (Ref<Texture2D> &E : resources) { + for (const Ref<Texture2D> &E : resources) { undo_redo->add_do_method(frames, "add_frame", edited_anim, E, p_at_pos == -1 ? -1 : p_at_pos + count); undo_redo->add_undo_method(frames, "remove_frame", edited_anim, p_at_pos == -1 ? fc : p_at_pos); count++; diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 6bd901cead..6bcc65e30c 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -2906,7 +2906,7 @@ void ThemeTypeEditor::_update_stylebox_from_leading() { continue; } - for (Ref<StyleBox> F : styleboxes) { + for (const Ref<StyleBox> &F : styleboxes) { Ref<StyleBox> sb = F; sb->set(E.name, value); } |