diff options
Diffstat (limited to 'mesalib/src/glsl/opt_function_inlining.cpp')
-rw-r--r-- | mesalib/src/glsl/opt_function_inlining.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mesalib/src/glsl/opt_function_inlining.cpp b/mesalib/src/glsl/opt_function_inlining.cpp index 9649598dd..b84bb8e11 100644 --- a/mesalib/src/glsl/opt_function_inlining.cpp +++ b/mesalib/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); @@ -342,8 +341,7 @@ ir_variable_replacement_visitor::visit_leave(ir_dereference_record *ir) ir_visitor_status ir_variable_replacement_visitor::visit_leave(ir_call *ir) { - foreach_list_safe(n, &ir->actual_parameters) { - ir_rvalue *param = (ir_rvalue *) n; + foreach_in_list_safe(ir_rvalue, param, &ir->actual_parameters) { ir_rvalue *new_param = param; replace_rvalue(&new_param); |