glsl: Eliminate assumptions about size of ir_expression::operands

This may grow in the near future.
This commit is contained in:
Ian Romanick
2010-11-10 16:33:10 -08:00
parent f2616e56de
commit fc92e87b97
7 changed files with 13 additions and 7 deletions

View File

@@ -22,6 +22,7 @@
*/
#include <string.h>
#include "main/compiler.h"
#include "ir.h"
#include "glsl_types.h"
extern "C" {
@@ -160,7 +161,7 @@ ir_call::clone(void *mem_ctx, struct hash_table *ht) const
ir_expression *
ir_expression::clone(void *mem_ctx, struct hash_table *ht) const
{
ir_rvalue *op[2] = {NULL, NULL};
ir_rvalue *op[Elements(this->operands)] = { NULL, };
unsigned int i;
for (i = 0; i < get_num_operands(); i++) {