mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Use range iterators for Map
This commit is contained in:
parent
e4dfa69bcf
commit
c63b18507d
154 changed files with 1897 additions and 1897 deletions
|
@ -123,9 +123,9 @@ void VisualShaderGraphPlugin::set_connections(List<VisualShader::Connection> &p_
|
|||
|
||||
void VisualShaderGraphPlugin::show_port_preview(VisualShader::Type p_type, int p_node_id, int p_port_id) {
|
||||
if (visual_shader->get_shader_type() == p_type && links.has(p_node_id) && links[p_node_id].output_ports.has(p_port_id)) {
|
||||
for (Map<int, Port>::Element *E = links[p_node_id].output_ports.front(); E; E = E->next()) {
|
||||
if (E->value().preview_button != nullptr) {
|
||||
E->value().preview_button->set_pressed(false);
|
||||
for (const KeyValue<int, Port> &E : links[p_node_id].output_ports) {
|
||||
if (E.value.preview_button != nullptr) {
|
||||
E.value.preview_button->set_pressed(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,11 +264,11 @@ void VisualShaderGraphPlugin::register_curve_editor(int p_node_id, int p_index,
|
|||
}
|
||||
|
||||
void VisualShaderGraphPlugin::update_uniform_refs() {
|
||||
for (Map<int, Link>::Element *E = links.front(); E; E = E->next()) {
|
||||
VisualShaderNodeUniformRef *ref = Object::cast_to<VisualShaderNodeUniformRef>(E->get().visual_node);
|
||||
for (KeyValue<int, Link> &E : links) {
|
||||
VisualShaderNodeUniformRef *ref = Object::cast_to<VisualShaderNodeUniformRef>(E.value.visual_node);
|
||||
if (ref) {
|
||||
remove_node(E->get().type, E->key());
|
||||
add_node(E->get().type, E->key());
|
||||
remove_node(E.value.type, E.key);
|
||||
add_node(E.value.type, E.key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue