diff options
author | Eric Anholt <eric@anholt.net> | 2010-06-23 16:42:37 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-24 13:32:35 -0700 |
commit | 5f384088336c23c4fe332d2735450bf455c88200 (patch) | |
tree | a9526e18f7c45243b8c68a7116fb21dc49c747d2 /ir.cpp | |
parent | ae805922b7e3cdaf3aee26c3b799fe3608669bba (diff) |
Move ir_constant cloning alongside the other cloning functions.
Diffstat (limited to 'ir.cpp')
-rw-r--r-- | ir.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
@@ -297,37 +297,6 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list) } } -ir_instruction * -ir_constant::clone(struct hash_table *ht) const -{ - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - case GLSL_TYPE_FLOAT: - case GLSL_TYPE_BOOL: - return new ir_constant(this->type, &this->value); - - case GLSL_TYPE_STRUCT: { - ir_constant *c = new ir_constant; - - c->type = this->type; - for (exec_node *node = this->components.head - ; !node->is_tail_sentinal() - ; node = node->next) { - ir_constant *const orig = (ir_constant *) node; - - c->components.push_tail(orig->clone(NULL)); - } - - return c; - } - - default: - assert(!"Should not get here."); break; - return NULL; - } -} - bool ir_constant::get_bool_component(unsigned i) const { |