nir/spirv: Use a C99-style initializer for structure fields
[mesa.git] / src / glsl / loop_analysis.cpp
index 0e232e7b5141f3400edddcda07c90901dd447431..21d46ebce536129198256f4520b8392f154c3fe2 100644 (file)
@@ -300,9 +300,7 @@ loop_analysis::visit_leave(ir_loop *ir)
    }
 
 
-   foreach_list_safe(node, &ls->variables) {
-      loop_variable *lv = (loop_variable *) node;
-
+   foreach_in_list_safe(loop_variable, lv, &ls->variables) {
       /* Move variables that are already marked as being loop constant to
        * a separate list.  These trivially don't need to be tested.
        */
@@ -330,9 +328,7 @@ loop_analysis::visit_leave(ir_loop *ir)
    do {
       progress = false;
 
-      foreach_list_safe(node, &ls->variables) {
-        loop_variable *lv = (loop_variable *) node;
-
+      foreach_in_list_safe(loop_variable, lv, &ls->variables) {
         if (lv->conditional_or_nested_assignment || (lv->num_assignments > 1))
            continue;
 
@@ -356,9 +352,7 @@ loop_analysis::visit_leave(ir_loop *ir)
    /* The remaining variables that are not loop invariant might be loop
     * induction variables.
     */
-   foreach_list_safe(node, &ls->variables) {
-      loop_variable *lv = (loop_variable *) node;
-
+   foreach_in_list_safe(loop_variable, lv, &ls->variables) {
       /* If there is more than one assignment to a variable, it cannot be a
        * loop induction variable.  This isn't strictly true, but this is a
        * very simple induction variable detector, and it can't handle more