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/s_expression.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/s_expression.cpp')
-rw-r--r-- | src/glsl/s_expression.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp index 6906ff0eb67..1a28e1d5248 100644 --- a/src/glsl/s_expression.cpp +++ b/src/glsl/s_expression.cpp @@ -162,8 +162,7 @@ void s_symbol::print() void s_list::print() { printf("("); - foreach_list(n, &this->subexpressions) { - s_expression *expr = (s_expression *) n; + foreach_in_list(s_expression, expr, &this->subexpressions) { expr->print(); if (!expr->next->is_tail_sentinel()) printf(" "); @@ -201,11 +200,10 @@ s_match(s_expression *top, unsigned n, s_pattern *pattern, bool partial) return false; unsigned i = 0; - foreach_list(node, &list->subexpressions) { + foreach_in_list(s_expression, expr, &list->subexpressions) { if (i >= n) return partial; /* More actual items than the pattern expected */ - s_expression *expr = (s_expression *) node; if (expr == NULL || !pattern[i].match(expr)) return false; |