summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-04-07 16:56:57 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-28 15:34:52 -0700
commit7dd6adbe2e791b22de97175a8715ef1217619c99 (patch)
treefa320649748897b8e43de57412b4bde019fd29cd /ir.h
parent1a3a096bf51e86ddc63402def7dff39b41b7cd63 (diff)
Refactor ir_expression::get_num_operands.
A new static version takes an ir_expression_operation enum, and the original non-static version now uses it. This will make it easier to read operations (where the ir_expression doesn't yet exist).
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/ir.h b/ir.h
index c93c043f5e..892455e1de 100644
--- a/ir.h
+++ b/ir.h
@@ -471,7 +471,11 @@ public:
ir_expression(int op, const struct glsl_type *type,
ir_rvalue *, ir_rvalue *);
- unsigned int get_num_operands(void);
+ static unsigned int get_num_operands(ir_expression_operation);
+ unsigned int get_num_operands()
+ {
+ return get_num_operands(operation);
+ }
virtual void accept(ir_visitor *v)
{