diff options
Diffstat (limited to 'src/glsl/opt_dead_functions.cpp')
-rw-r--r-- | src/glsl/opt_dead_functions.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/opt_dead_functions.cpp b/src/glsl/opt_dead_functions.cpp index 81c46d58217..5dff165215a 100644 --- a/src/glsl/opt_dead_functions.cpp +++ b/src/glsl/opt_dead_functions.cpp @@ -122,9 +122,7 @@ do_dead_functions(exec_list *instructions) * the unused ones, and remove function definitions that have no more * signatures. */ - foreach_list_safe(n, &v.signature_list) { - signature_entry *entry = (signature_entry *) n; - + foreach_in_list_safe(signature_entry, entry, &v.signature_list) { if (!entry->used) { entry->signature->remove(); delete entry->signature; @@ -136,8 +134,7 @@ do_dead_functions(exec_list *instructions) /* We don't just do this above when we nuked a signature because of * const pointers. */ - foreach_list_safe(n, instructions) { - ir_instruction *ir = (ir_instruction *) n; + foreach_in_list_safe(ir_instruction, ir, instructions) { ir_function *func = ir->as_function(); if (func && func->signatures.is_empty()) { |