Fix broken constructor of ir_instruction base class
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 11 Mar 2010 22:23:41 +0000 (14:23 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 11 Mar 2010 22:23:41 +0000 (14:23 -0800)
Make the constructor inline-able, and don't try to initialize it as a
simple_node.  It hasn't been derived from simple_node in a long time.

ir.cpp
ir.h

diff --git a/ir.cpp b/ir.cpp
index ad93310bc90f626754324e3969948d8fe2285623..3166cdc9efffe89e9c4aab7ad709bda2746c943d 100644 (file)
--- a/ir.cpp
+++ b/ir.cpp
 #include "ir.h"
 #include "glsl_types.h"
 
-ir_instruction::ir_instruction(int mode)
-{
-   this->mode = mode;
-   make_empty_list(this);
-}
-
-
 ir_assignment::ir_assignment(ir_instruction *lhs, ir_instruction *rhs,
                             ir_expression *condition)
    : ir_instruction(ir_op_assign)
diff --git a/ir.h b/ir.h
index a4cc1d8b94fc2719782c4a709e7f9d22c39c095a..7de7c38532382fffe3fce9167c582ba414c2b43b 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -53,7 +53,11 @@ public:
    virtual void accept(ir_visitor *) = 0;
 
 protected:
-   ir_instruction(int mode);
+   ir_instruction(int mode)
+      : mode(mode)
+   {
+      /* empty */
+   }
 
 private:
    /**