[Mesa-dev] [PATCH 07/14] glsl: Add copy-constructor for ast_type_specifier.

Matt Turner mattst88 at gmail.com
Sat Jun 29 19:43:57 PDT 2013


---
 src/glsl/ast.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 4c2331e..13c5e6b 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -469,6 +469,16 @@ public:
 
 class ast_type_specifier : public ast_node {
 public:
+   /** Copy constructor */
+   ast_type_specifier(const ast_type_specifier *type)
+      : type_name(type->type_name), structure(type->structure),
+        is_array(type->is_array), array_size(type->array_size),
+        precision(type->precision),
+        is_precision_statement(type->is_precision_statement)
+   {
+      /* empty */
+   }
+
    /** Construct a type specifier from a type name */
    ast_type_specifier(const char *name) 
       : type_name(name), structure(NULL),
-- 
1.8.1.5



More information about the mesa-dev mailing list