diff options
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r-- | src/glsl/ir.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 6ffa987f6d2..1a36bd631c1 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -1649,13 +1649,10 @@ modes_match(unsigned a, unsigned b) const char * ir_function_signature::qualifiers_match(exec_list *params) { - exec_list_iterator iter_a = parameters.iterator(); - exec_list_iterator iter_b = params->iterator(); - /* check that the qualifiers match. */ - while (iter_a.has_next()) { - ir_variable *a = (ir_variable *)iter_a.get(); - ir_variable *b = (ir_variable *)iter_b.get(); + foreach_two_lists(a_node, &this->parameters, b_node, params) { + ir_variable *a = (ir_variable *) a_node; + ir_variable *b = (ir_variable *) b_node; if (a->data.read_only != b->data.read_only || !modes_match(a->data.mode, b->data.mode) || @@ -1666,9 +1663,6 @@ ir_function_signature::qualifiers_match(exec_list *params) /* parameter a's qualifiers don't match */ return a->name; } - - iter_a.next(); - iter_b.next(); } return NULL; } |