summaryrefslogtreecommitdiff
path: root/src/glsl/ir_hv_accept.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-07-19 14:49:34 -0700
committerKenneth Graunke <kenneth@whitecape.org>2010-07-19 14:49:34 -0700
commit61a44ccaef63a8ad36ebd934e6944ede5587e4d5 (patch)
tree92c18c53abea056b180b7a513bda76aeb6d4dd22 /src/glsl/ir_hv_accept.cpp
parent303c99f12fd1234a763147f9e081f2544433fc77 (diff)
exec_list: Fix foreach_list_safe.
It now works correctly when nodes are removed, as it was originally intended to do; it no longer processes nodes added to the list before the current node, nor those added immediately after the current node. This matches the behavior of Linux's list_for_each_safe.
Diffstat (limited to 'src/glsl/ir_hv_accept.cpp')
-rw-r--r--src/glsl/ir_hv_accept.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glsl/ir_hv_accept.cpp b/src/glsl/ir_hv_accept.cpp
index 46bc5b17fe..8989605e26 100644
--- a/src/glsl/ir_hv_accept.cpp
+++ b/src/glsl/ir_hv_accept.cpp
@@ -32,9 +32,10 @@
/**
* Process a list of nodes using a hierarchical vistor
*
+ * \warning
* This function will operate correctly if a node being processed is removed
- * from the list. If nodes are inserted before the current node, they will be
- * processed next.
+ * from the list. However, if nodes are added to the list after the node being
+ * processed, some of the added nodes may not be processed.
*/
ir_visitor_status
visit_list_elements(ir_hierarchical_visitor *v, exec_list *l)