diff options
author | rune-scape <spartacrafter@gmail.com> | 2024-07-28 08:01:36 -0700 |
---|---|---|
committer | rune-scape <spartacrafter@gmail.com> | 2024-11-08 00:10:08 -0800 |
commit | a47daa0a44900a4246cc8f71041593590c86a711 (patch) | |
tree | 1337670b31236607aca6528bc5e2fff87bc3b69a /editor | |
parent | b00e1cbf743dcb6a2b7f6bd14e348a1a7cf3d403 (diff) | |
download | redot-engine-a47daa0a44900a4246cc8f71041593590c86a711.tar.gz |
Avoid const_cast in List::erase by requiring mutable elements
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index 05929c5f0d..9c1befa144 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -1472,7 +1472,7 @@ void VisualShaderGraphPlugin::disconnect_nodes(VisualShader::Type p_type, int p_ if (visual_shader.is_valid() && visual_shader->get_shader_type() == p_type) { graph->disconnect_node(itos(p_from_node), p_from_port, itos(p_to_node), p_to_port); - for (const List<VisualShader::Connection>::Element *E = connections.front(); E; E = E->next()) { + for (List<VisualShader::Connection>::Element *E = 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) { connections.erase(E); break; |