From 8d51618949d5ea8a94e0f504401e8f852a393968 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 12 Feb 2019 21:10:08 +0100 Subject: Add -Wshadow=local to warnings and fix reported issues. Fixes #25316. --- scene/gui/graph_edit.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'scene/gui/graph_edit.cpp') diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 94c65b3e64..f3f2e586a6 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -221,8 +221,8 @@ void GraphEdit::_graph_node_raised(Node *p_gn) { } int first_not_comment = 0; for (int i = 0; i < get_child_count(); i++) { - GraphNode *gn = Object::cast_to(get_child(i)); - if (gn && !gn->is_comment()) { + GraphNode *gn2 = Object::cast_to(get_child(i)); + if (gn2 && !gn2->is_comment()) { first_not_comment = i; break; } @@ -958,33 +958,33 @@ void GraphEdit::_gui_input(const Ref &p_ev) { previus_selected.clear(); for (int i = get_child_count() - 1; i >= 0; i--) { - GraphNode *gn = Object::cast_to(get_child(i)); - if (!gn || !gn->is_selected()) + GraphNode *gn2 = Object::cast_to(get_child(i)); + if (!gn2 || !gn2->is_selected()) continue; - previus_selected.push_back(gn); + previus_selected.push_back(gn2); } } else if (b->get_shift()) { box_selection_mode_aditive = false; previus_selected.clear(); for (int i = get_child_count() - 1; i >= 0; i--) { - GraphNode *gn = Object::cast_to(get_child(i)); - if (!gn || !gn->is_selected()) + GraphNode *gn2 = Object::cast_to(get_child(i)); + if (!gn2 || !gn2->is_selected()) continue; - previus_selected.push_back(gn); + previus_selected.push_back(gn2); } } else { box_selection_mode_aditive = true; previus_selected.clear(); for (int i = get_child_count() - 1; i >= 0; i--) { - GraphNode *gn = Object::cast_to(get_child(i)); - if (!gn) + GraphNode *gn2 = Object::cast_to(get_child(i)); + if (!gn2) continue; - gn->set_selected(false); + gn2->set_selected(false); } } } -- cgit v1.2.3