From 92299989bd10fd9855b6d77bc2bfabae218d1eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 26 Jul 2021 17:50:35 +0200 Subject: Use Ref references as iterators where relevant And const when possible. --- editor/plugins/sprite_frames_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor/plugins/sprite_frames_editor_plugin.cpp') 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 &p_path, int p_ int count = 0; - for (Ref &E : resources) { + for (const Ref &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++; -- cgit v1.2.3