diff options
author | Matt Turner <[email protected]> | 2014-06-24 21:58:35 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-01 08:55:51 -0700 |
commit | c6a16f6d0e489e6d2a1a75bcf34be00e892b3120 (patch) | |
tree | 493e9bd86b9bad457bca713372c5c48718b6eaa0 /src/glsl/opt_structure_splitting.cpp | |
parent | e0cb82d0c4ceba437c351d1e37fdb86fe5aed997 (diff) |
glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/opt_structure_splitting.cpp')
-rw-r--r-- | src/glsl/opt_structure_splitting.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp index 2abd7e42f99..5e82fe93aa7 100644 --- a/src/glsl/opt_structure_splitting.cpp +++ b/src/glsl/opt_structure_splitting.cpp @@ -313,9 +313,7 @@ do_structure_splitting(exec_list *instructions) visit_list_elements(&refs, instructions); /* Trim out variables we can't split. */ - foreach_list_safe(n, &refs.variable_list) { - variable_entry *entry = (variable_entry *) n; - + foreach_in_list_safe(variable_entry, entry, &refs.variable_list) { if (debug) { printf("structure %s@%p: decl %d, whole_access %d\n", entry->var->name, (void *) entry->var, entry->declaration, @@ -335,8 +333,7 @@ do_structure_splitting(exec_list *instructions) /* Replace the decls of the structures to be split with their split * components. */ - foreach_list_safe(n, &refs.variable_list) { - variable_entry *entry = (variable_entry *) n; + foreach_in_list_safe(variable_entry, entry, &refs.variable_list) { const struct glsl_type *type = entry->var->type; entry->mem_ctx = ralloc_parent(entry->var); |