From fafcbf52b7a45494e11488eb37d1e0b036ac8e4b Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 15 Jan 2013 17:29:21 -0800 Subject: glsl/ir_factory: Initialize members to NULL in constructor This eliminates unexpected behavior due to unitialized values. Reviewed-by: Ian Romanick Signed-off-by: Chad Versace --- src/glsl/ir_builder.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/glsl/ir_builder.h b/src/glsl/ir_builder.h index 067858df45b..278294fe963 100644 --- a/src/glsl/ir_builder.h +++ b/src/glsl/ir_builder.h @@ -73,6 +73,13 @@ public: class ir_factory { public: + ir_factory() + : instructions(NULL), + mem_ctx(NULL) + { + return; + } + void emit(ir_instruction *ir); ir_variable *make_temp(const glsl_type *type, const char *name); -- cgit v1.2.3