glsl: tidy up int declaration
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 21 Jun 2017 10:12:12 +0000 (20:12 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 22 Jun 2017 10:06:38 +0000 (20:06 +1000)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/compiler/glsl/opt_algebraic.cpp

index a5a10293e8a99119f48fbfd14a374fe97ec046f2..b44ab595ecb3ea49f019788fd9a72f99e18ceacb 100644 (file)
@@ -313,7 +313,6 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
 {
    ir_constant *op_const[4] = {NULL, NULL, NULL, NULL};
    ir_expression *op_expr[4] = {NULL, NULL, NULL, NULL};
-   unsigned int i;
 
    if (ir->operation == ir_binop_mul &&
        ir->operands[0]->type->is_matrix() &&
@@ -330,7 +329,7 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
    }
 
    assert(ir->get_num_operands() <= 4);
-   for (i = 0; i < ir->get_num_operands(); i++) {
+   for (unsigned i = 0; i < ir->get_num_operands(); i++) {
       if (ir->operands[i]->type->is_matrix())
         return ir;