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 067858df45bf7c89e8cc3e80a421ada2f0f0d75b..278294fe963b972d019b918bf14e1c719a4875a3 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);