summaryrefslogtreecommitdiffstats
path: root/scene/gui
diff options
context:
space:
mode:
authorrune-scape <spartacrafter@gmail.com>2024-07-28 08:01:36 -0700
committerrune-scape <spartacrafter@gmail.com>2024-11-08 00:10:08 -0800
commita47daa0a44900a4246cc8f71041593590c86a711 (patch)
tree1337670b31236607aca6528bc5e2fff87bc3b69a /scene/gui
parentb00e1cbf743dcb6a2b7f6bd14e348a1a7cf3d403 (diff)
downloadredot-engine-a47daa0a44900a4246cc8f71041593590c86a711.tar.gz
Avoid const_cast in List::erase by requiring mutable elements
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/graph_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index cb495f9d47..b1c47d858d 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -317,7 +317,7 @@ bool GraphEdit::is_node_connected(const StringName &p_from, int p_from_port, con
void GraphEdit::disconnect_node(const StringName &p_from, int p_from_port, const StringName &p_to, int p_to_port) {
ERR_FAIL_NULL_MSG(connections_layer, "connections_layer is missing.");
- for (const List<Ref<Connection>>::Element *E = connections.front(); E; E = E->next()) {
+ for (List<Ref<Connection>>::Element *E = connections.front(); E; E = E->next()) {
if (E->get()->from_node == p_from && E->get()->from_port == p_from_port && E->get()->to_node == p_to && E->get()->to_port == p_to_port) {
connection_map[p_from].erase(E->get());
connection_map[p_to].erase(E->get());