glsl/ir_factory: Initialize members to NULL in constructor
authorChad Versace <chad.versace@linux.intel.com>
Wed, 16 Jan 2013 01:29:21 +0000 (17:29 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Fri, 25 Jan 2013 05:24:10 +0000 (21:24 -0800)
This eliminates unexpected behavior due to unitialized values.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/glsl/ir_builder.h

index 067858d..278294f 100644 (file)
@@ -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);