glsl: Replace foreach_iter with foreach_list_safe
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 1 Aug 2011 20:36:12 +0000 (13:36 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 15 Aug 2011 18:44:26 +0000 (11:44 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
src/glsl/lower_if_to_cond_assign.cpp

index 2d447e043a5d1734b65d3b2d5ac86769533a8591..5c74bc1816c5ee305ae707f1be97b4158af6f826 100644 (file)
@@ -97,8 +97,8 @@ move_block_to_cond_assign(void *mem_ctx,
                          ir_if *if_ir, ir_rvalue *cond_expr,
                          exec_list *instructions)
 {
-   foreach_iter(exec_list_iterator, iter, *instructions) {
-      ir_instruction *ir = (ir_instruction *)iter.get();
+   foreach_list_safe(node, instructions) {
+      ir_instruction *ir = (ir_instruction *) node;
 
       if (ir->ir_type == ir_type_assignment) {
         ir_assignment *assign = (ir_assignment *)ir;