diff options
author | Kenneth Graunke <[email protected]> | 2013-11-22 02:10:15 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-01-13 11:38:19 -0800 |
commit | 838a6871bbcd8cd0493bb39b188129f7d49de47e (patch) | |
tree | 78a442fbc3ee72f5e13d2130d8aee34cfd9b97b7 /src/glsl/opt_dead_functions.cpp | |
parent | 5f7e778fa1b1e969a1b15e3650dec49b0026ed08 (diff) |
glsl: Convert piles of foreach_iter to foreach_list_safe.
In these cases, we edit the list (or at least might be), so we use the
foreach_list_safe variant.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/opt_dead_functions.cpp')
-rw-r--r-- | src/glsl/opt_dead_functions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/opt_dead_functions.cpp b/src/glsl/opt_dead_functions.cpp index 2896072abca..8bb278e4537 100644 --- a/src/glsl/opt_dead_functions.cpp +++ b/src/glsl/opt_dead_functions.cpp @@ -123,8 +123,8 @@ do_dead_functions(exec_list *instructions) * the unused ones, and remove function definitions that have no more * signatures. */ - foreach_iter(exec_list_iterator, iter, v.signature_list) { - signature_entry *entry = (signature_entry *)iter.get(); + foreach_list_safe(n, &v.signature_list) { + signature_entry *entry = (signature_entry *) n; if (!entry->used) { entry->signature->remove(); @@ -137,8 +137,8 @@ do_dead_functions(exec_list *instructions) /* We don't just do this above when we nuked a signature because of * const pointers. */ - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); + foreach_list_safe(n, instructions) { + ir_instruction *ir = (ir_instruction *) n; ir_function *func = ir->as_function(); if (func && func->signatures.is_empty()) { |