summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_dead_functions.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-06-24 21:58:35 -0700
committerMatt Turner <[email protected]>2014-07-01 08:55:51 -0700
commitc6a16f6d0e489e6d2a1a75bcf34be00e892b3120 (patch)
tree493e9bd86b9bad457bca713372c5c48718b6eaa0 /src/glsl/opt_dead_functions.cpp
parente0cb82d0c4ceba437c351d1e37fdb86fe5aed997 (diff)
glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/opt_dead_functions.cpp')
-rw-r--r--src/glsl/opt_dead_functions.cpp7
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()) {