From: Kenneth Graunke Date: Wed, 28 Jul 2010 19:20:38 +0000 (-0700) Subject: ir_algebraic: Use ir_constant::zero. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f7b94f32a22a769fc71065ca6515186e5a8e3a96;p=mesa.git ir_algebraic: Use ir_constant::zero. --- diff --git a/src/glsl/ir_algebraic.cpp b/src/glsl/ir_algebraic.cpp index 5b065b086e5..a6ecad7b659 100644 --- a/src/glsl/ir_algebraic.cpp +++ b/src/glsl/ir_algebraic.cpp @@ -213,13 +213,9 @@ ir_algebraic_visitor::handle_expression(ir_rvalue *in_ir) return ir->operands[0]; } - if (is_vec_zero(op_const[0]) || - is_vec_zero(op_const[1])) { - ir_constant_data zero_data; - memset(&zero_data, 0, sizeof(zero_data)); - + if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) { this->progress = true; - return new(ir) ir_constant(ir->type, &zero_data); + return ir_constant::zero(ir, ir->type); } break;