diff options
author | Matt Turner <[email protected]> | 2014-06-24 22:11:04 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-01 08:55:51 -0700 |
commit | fd8f65498a407fd8d4a17fd622755f14c27d014a (patch) | |
tree | cbe6b661645449250d504417a3026b95334687cf /src | |
parent | 6e217ad1d79498a0622374d10a7eee108d470e21 (diff) |
glsl: Replace another couple uses of foreach_list.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/ir_reader.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index 445d381cf50..4017bdd736c 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -170,9 +170,8 @@ ir_reader::scan_for_prototypes(exec_list *instructions, s_expression *expr) return; } - foreach_list(n, &list->subexpressions) { - s_list *sub = SX_AS_LIST(n); - if (sub == NULL) + foreach_in_list(s_list, sub, &list->subexpressions) { + if (!sub->is_list()) continue; // not a (function ...); ignore it. s_symbol *tag = SX_AS_SYMBOL(sub->subexpressions.get_head()); @@ -404,9 +403,8 @@ ir_reader::read_declaration(s_expression *expr) ir_variable *var = new(mem_ctx) ir_variable(type, s_name->value(), ir_var_auto); - foreach_list(n, &s_quals->subexpressions) { - s_symbol *qualifier = SX_AS_SYMBOL(n); - if (qualifier == NULL) { + foreach_in_list(s_symbol, qualifier, &s_quals->subexpressions) { + if (!qualifier->is_symbol()) { ir_read_error(expr, "qualifier list must contain only symbols"); return NULL; } |