You've already forked godot
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user