diff options
Diffstat (limited to 'scene/gui/graph_node.cpp')
-rw-r--r-- | scene/gui/graph_node.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index ecf735d7f5..8462fd259e 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -403,28 +403,28 @@ void GraphNode::_notification(int p_what) { close_rect = Rect2(); } - for (Map<int, Slot>::Element *E = slot_info.front(); E; E = E->next()) { - if (E->key() < 0 || E->key() >= cache_y.size()) { + for (const KeyValue<int, Slot> &E : slot_info) { + if (E.key < 0 || E.key >= cache_y.size()) { continue; } - if (!slot_info.has(E->key())) { + if (!slot_info.has(E.key)) { continue; } - const Slot &s = slot_info[E->key()]; + const Slot &s = slot_info[E.key]; //left if (s.enable_left) { Ref<Texture2D> p = port; if (s.custom_slot_left.is_valid()) { p = s.custom_slot_left; } - p->draw(get_canvas_item(), icofs + Point2(edgeofs, cache_y[E->key()]), s.color_left); + p->draw(get_canvas_item(), icofs + Point2(edgeofs, cache_y[E.key]), s.color_left); } if (s.enable_right) { Ref<Texture2D> p = port; if (s.custom_slot_right.is_valid()) { p = s.custom_slot_right; } - p->draw(get_canvas_item(), icofs + Point2(get_size().x - edgeofs, cache_y[E->key()]), s.color_right); + p->draw(get_canvas_item(), icofs + Point2(get_size().x - edgeofs, cache_y[E.key]), s.color_right); } } |