diff options
author | Matt Turner <[email protected]> | 2014-06-24 21:34:05 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-01 08:55:51 -0700 |
commit | 4d78446d782e2d942b4cd0cd00a27bf922ccd479 (patch) | |
tree | eaaa99ce79c54ddef6cf35c8d3d028b9e0aa44b4 /src/glsl/ast_to_hir.cpp | |
parent | da9f0316e6ea628c085040a0c145580301207489 (diff) |
glsl: Use typed foreach_in_list instead of foreach_list.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 042ef243b64..eb9fe4b97b7 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -4210,10 +4210,8 @@ ast_function_definition::hir(exec_list *instructions, * Add these to the symbol table. */ state->symbols->push_scope(); - foreach_list(n, &signature->parameters) { - ir_variable *const var = ((ir_instruction *) n)->as_variable(); - - assert(var != NULL); + foreach_in_list(ir_variable, var, &signature->parameters) { + assert(var->as_variable() != NULL); /* The only way a parameter would "exist" is if two parameters have * the same name. @@ -5678,8 +5676,8 @@ ast_gs_input_layout::hir(exec_list *instructions, /* If any shader inputs occurred before this declaration and did not * specify an array size, their size is determined now. */ - foreach_list (node, instructions) { - ir_variable *var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, instructions) { + ir_variable *var = node->as_variable(); if (var == NULL || var->data.mode != ir_var_shader_in) continue; @@ -5796,8 +5794,8 @@ detect_conflicting_assignments(struct _mesa_glsl_parse_state *state, YYLTYPE loc; memset(&loc, 0, sizeof(loc)); - foreach_list(node, instructions) { - ir_variable *var = ((ir_instruction *)node)->as_variable(); + foreach_in_list(ir_instruction, node, instructions) { + ir_variable *var = node->as_variable(); if (!var || !var->data.assigned) continue; |