aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_basic_block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ir_basic_block.cpp')
-rw-r--r--mesalib/src/glsl/ir_basic_block.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/mesalib/src/glsl/ir_basic_block.cpp b/mesalib/src/glsl/ir_basic_block.cpp
index 74ee4b696..15481aa47 100644
--- a/mesalib/src/glsl/ir_basic_block.cpp
+++ b/mesalib/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);
}
}