summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_basic_block.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-06-24 21:34:05 -0700
committerMatt Turner <[email protected]>2014-07-01 08:55:51 -0700
commit4d78446d782e2d942b4cd0cd00a27bf922ccd479 (patch)
treeeaaa99ce79c54ddef6cf35c8d3d028b9e0aa44b4 /src/glsl/ir_basic_block.cpp
parentda9f0316e6ea628c085040a0c145580301207489 (diff)
glsl: Use typed foreach_in_list instead of foreach_list.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir_basic_block.cpp')
-rw-r--r--src/glsl/ir_basic_block.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/ir_basic_block.cpp b/src/glsl/ir_basic_block.cpp
index 74ee4b69622..15481aa47f6 100644
--- a/src/glsl/ir_basic_block.cpp
+++ b/src/glsl/ir_basic_block.cpp
@@ -56,8 +56,7 @@ void call_for_basic_blocks(exec_list *instructions,
ir_instruction *leader = NULL;
ir_instruction *last = NULL;
- foreach_list(n, instructions) {
- ir_instruction *ir = (ir_instruction *) n;
+ foreach_in_list(ir_instruction, ir, instructions) {
ir_if *ir_if;
ir_loop *ir_loop;
ir_function *ir_function;
@@ -88,9 +87,7 @@ void call_for_basic_blocks(exec_list *instructions,
* and the body of main(). Perhaps those instructions ought
* to live inside of main().
*/
- foreach_list(func_node, &ir_function->signatures) {
- ir_function_signature *ir_sig = (ir_function_signature *) func_node;
-
+ foreach_in_list(ir_function_signature, ir_sig, &ir_function->signatures) {
call_for_basic_blocks(&ir_sig->body, callback, data);
}
}