diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 15:49:49 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 15:49:49 -0700 |
commit | 0bb70a30d5adbbd2b187f3e714420f2ce6f49046 (patch) | |
tree | 0a6d9f439a1722d23e72e463811321605addb838 | |
parent | be1d2bfdeab5781b6546b704b566aa214e79da06 (diff) |
ir_constant_visitor: Use 'union ir_constant_data' instead of open-coded version
-rw-r--r-- | ir_constant_expression.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/ir_constant_expression.cpp b/ir_constant_expression.cpp index a3ce6e7e59..4c92478db1 100644 --- a/ir_constant_expression.cpp +++ b/ir_constant_expression.cpp @@ -558,11 +558,7 @@ ir_constant_visitor::visit(ir_swizzle *ir) this->value = NULL; if (v != NULL) { - union { - float f[4]; - unsigned u[4]; - bool b[4]; - } data; + ir_constant_data data; const unsigned swiz_idx[4] = { ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w @@ -615,10 +611,7 @@ ir_constant_visitor::visit(ir_dereference_array *ir) */ const unsigned mat_idx = column * column_type->vector_elements; - union { - unsigned u[4]; - float f[4]; - } data; + ir_constant_data data; switch (column_type->base_type) { case GLSL_TYPE_UINT: |