From 50e9e570dd7b04e4a10a188a4dd828e1d0b1a56d Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sun, 15 Sep 2024 13:32:58 +0200 Subject: [PATCH] Fix loop variables used as copy --- editor/limbo_ai_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/limbo_ai_editor_plugin.cpp b/editor/limbo_ai_editor_plugin.cpp index f5cc382..9e2b8ff 100644 --- a/editor/limbo_ai_editor_plugin.cpp +++ b/editor/limbo_ai_editor_plugin.cpp @@ -869,7 +869,7 @@ void LimboAIEditor::_on_tasks_dragged(const TypedArray &p_tasks, Ref task : tasks_list) { + for (const Ref &task : tasks_list) { if (task->get_parent() == p_to_task && p_to_pos > task->get_index()) { before_pos += 1; } @@ -883,7 +883,7 @@ void LimboAIEditor::_on_tasks_dragged(const TypedArray &p_tasks, Ref task : tasks_list) { + for (const Ref &task : tasks_list) { undo_redo->add_undo_method(task->get_parent().ptr(), LW_NAME(add_child_at_index), task, task->get_index()); }