summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_function_detect_recursion.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2014-06-24 21:58:35 -0700
committerMatt Turner <[email protected]>2014-07-01 08:55:51 -0700
commitc6a16f6d0e489e6d2a1a75bcf34be00e892b3120 (patch)
tree493e9bd86b9bad457bca713372c5c48718b6eaa0 /src/glsl/ir_function_detect_recursion.cpp
parente0cb82d0c4ceba437c351d1e37fdb86fe5aed997 (diff)
glsl: Use typed foreach_in_list_safe instead of foreach_list_safe.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir_function_detect_recursion.cpp')
-rw-r--r--src/glsl/ir_function_detect_recursion.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/glsl/ir_function_detect_recursion.cpp b/src/glsl/ir_function_detect_recursion.cpp
index 5813315b613..b2334d2e403 100644
--- a/src/glsl/ir_function_detect_recursion.cpp
+++ b/src/glsl/ir_function_detect_recursion.cpp
@@ -229,15 +229,13 @@ public:
static void
destroy_links(exec_list *list, function *f)
{
- foreach_list_safe(node, list) {
- struct call_node *n = (struct call_node *) node;
-
+ foreach_in_list_safe(call_node, node, list) {
/* If this is the right function, remove it. Note that the loop cannot
* terminate now. There can be multiple links to a function if it is
* either called multiple times or calls multiple times.
*/
- if (n->func == f)
- n->remove();
+ if (node->func == f)
+ node->remove();
}
}