diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-11-10 16:33:10 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-11-19 15:00:25 -0800 |
commit | fc92e87b9757eda01caf0bb3e2c31b1dbbd73aa0 (patch) | |
tree | 0166f7ad2f9b19794f8a65b0b050fe4dc4cd083a /src/glsl/ir_print_visitor.cpp | |
parent | f2616e56de8a48360cae8f269727b58490555f4d (diff) | |
download | external_mesa3d-fc92e87b9757eda01caf0bb3e2c31b1dbbd73aa0.zip external_mesa3d-fc92e87b9757eda01caf0bb3e2c31b1dbbd73aa0.tar.gz external_mesa3d-fc92e87b9757eda01caf0bb3e2c31b1dbbd73aa0.tar.bz2 |
glsl: Eliminate assumptions about size of ir_expression::operands
This may grow in the near future.
Diffstat (limited to 'src/glsl/ir_print_visitor.cpp')
-rw-r--r-- | src/glsl/ir_print_visitor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index 5c19db1..e5067bf 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -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(") "); } |