1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Avoid const_cast in List::erase by requiring mutable elements

This commit is contained in:
rune-scape
2024-07-28 08:01:36 -07:00
parent b00e1cbf74
commit a47daa0a44
4 changed files with 6 additions and 6 deletions

View File

@@ -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;