glsl: tidy up get_num_operands()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 9 Aug 2017 03:34:03 +0000 (13:34 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 11 Aug 2017 00:43:16 +0000 (10:43 +1000)
commit43cbcbfee9ab4a6aa1fbb51a1af7fd9619d3b7f5
tree0a2756508f551d2356d324520f71e14bf4858c32
parente2e2c5abd279df1b3aa99c52b81c9cb48fea35fb
glsl: tidy up get_num_operands()

Also add a comment that this should only be used by the ir_reader
interface for testing purposes.

v2:
 - fix grammar in comment
 - use unreachable rather than assert

Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
src/compiler/glsl/ir.cpp
src/compiler/glsl/ir.h