summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_constant_propagation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/opt_constant_propagation.cpp')
-rw-r--r--src/glsl/opt_constant_propagation.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/glsl/opt_constant_propagation.cpp b/src/glsl/opt_constant_propagation.cpp
index 42bdad4eb0b..c334e127606 100644
--- a/src/glsl/opt_constant_propagation.cpp
+++ b/src/glsl/opt_constant_propagation.cpp
@@ -393,9 +393,7 @@ ir_constant_propagation_visitor::kill(ir_variable *var, unsigned write_mask)
return;
/* Remove any entries currently in the ACP for this kill. */
- foreach_list_safe(n, this->acp) {
- acp_entry *entry = (acp_entry *) n;
-
+ foreach_in_list_safe(acp_entry, entry, this->acp) {
if (entry->var == var) {
entry->write_mask &= ~write_mask;
if (entry->write_mask == 0)