summaryrefslogtreecommitdiffstats
path: root/scene/resources
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/resources
parentb00e1cbf743dcb6a2b7f6bd14e348a1a7cf3d403 (diff)
downloadredot-engine-a47daa0a44900a4246cc8f71041593590c86a711.tar.gz
Avoid const_cast in List::erase by requiring mutable elements
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/visual_shader.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index 933e990920..18fdda6a2e 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -1368,7 +1368,7 @@ void VisualShader::disconnect_nodes(Type p_type, int p_from_node, int p_from_por
ERR_FAIL_INDEX(p_type, TYPE_MAX);
Graph *g = &graph[p_type];
- for (const List<Connection>::Element *E = g->connections.front(); E; E = E->next()) {
+ for (List<Connection>::Element *E = g->connections.front(); E; E = E->next()) {
if (E->get().from_node == p_from_node && E->get().from_port == p_from_port && E->get().to_node == p_to_node && E->get().to_port == p_to_port) {
g->connections.erase(E);
g->nodes[p_from_node].next_connected_nodes.erase(p_to_node);