glsl2: move constructor into .cpp file to work around compiler bug
authorBrian Paul <brianp@vmware.com>
Tue, 24 Aug 2010 16:01:40 +0000 (10:01 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 24 Aug 2010 16:01:44 +0000 (10:01 -0600)
Fixes fd.o bug 29770

The refcount==0 assertion only failed on some systems.  One example
being 32-bit Linux with gcc 4.4.4.

src/glsl/ir_variable_refcount.cpp
src/glsl/ir_variable_refcount.h

index 66147279bef32f63405610ecd21aa62ade48a13e..7d39abb3682e2d96a911c7814afc9f742fccc070 100644 (file)
 #include "ir_variable_refcount.h"
 #include "glsl_types.h"
 
+
+// constructor
+variable_entry::variable_entry(ir_variable *var)
+{
+   this->var = var;
+   assign = NULL;
+   assigned_count = 0;
+   declaration = false;
+   referenced_count = 0;
+}
+
+
 variable_entry *
 ir_variable_refcount_visitor::get_variable_entry(ir_variable *var)
 {
index 059ea097a626469275a0dd1a9be9d5c6eece4774..8b43bad71f84f38bb74a1c267260d4c7387a258e 100644 (file)
 class variable_entry : public exec_node
 {
 public:
-   variable_entry(ir_variable *var)
-   {
-      this->var = var;
-      assign = NULL;
-      referenced_count = 0;
-      assigned_count = 0;
-      declaration = false;
-   }
+   variable_entry(ir_variable *var);
 
    ir_variable *var; /* The key: the variable's pointer. */
    ir_assignment *assign; /* An assignment to the variable, if any */