summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_function_inlining.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/opt_function_inlining.cpp
parentda9f0316e6ea628c085040a0c145580301207489 (diff)
glsl: Use typed foreach_in_list instead of foreach_list.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/opt_function_inlining.cpp')
-rw-r--r--src/glsl/opt_function_inlining.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/glsl/opt_function_inlining.cpp b/src/glsl/opt_function_inlining.cpp
index 9649598dd2b..7212123a741 100644
--- a/src/glsl/opt_function_inlining.cpp
+++ b/src/glsl/opt_function_inlining.cpp
@@ -107,7 +107,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
ht = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare);
num_parameters = 0;
- foreach_list(n, &this->callee->parameters)
+ foreach_in_list(ir_rvalue, param, &this->callee->parameters)
num_parameters++;
parameters = new ir_variable *[num_parameters];
@@ -159,8 +159,7 @@ ir_call::generate_inline(ir_instruction *next_ir)
exec_list new_instructions;
/* Generate the inlined body of the function to a new list */
- foreach_list(n, &callee->body) {
- ir_instruction *ir = (ir_instruction *) n;
+ foreach_in_list(ir_instruction, ir, &callee->body) {
ir_instruction *new_ir = ir->clone(ctx, ht);
new_instructions.push_tail(new_ir);