glsl: Eliminate assumptions about size of ir_expression::operands

This may grow in the near future.
This commit is contained in:
Ian Romanick
2010-11-10 16:33:10 -08:00
parent f2616e56de
commit fc92e87b97
7 changed files with 13 additions and 7 deletions

View File

@@ -182,11 +182,10 @@ void ir_print_visitor::visit(ir_expression *ir)
printf(" %s ", ir->operator_string());
if (ir->operands[0])
ir->operands[0]->accept(this);
for (unsigned i = 0; i < ir->get_num_operands(); i++) {
ir->operands[i]->accept(this);
}
if (ir->operands[1])
ir->operands[1]->accept(this);
printf(") ");
}