diff options
author | Matt Turner <mattst88@gmail.com> | 2013-06-26 15:52:28 -0700 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2013-07-11 20:58:59 -0700 |
commit | a760c73853e3d1bd4243f22fa968ce21a8eea0d6 (patch) | |
tree | 2af152f0f0dd47bd4d98b7ca97fb0a25632dbf32 /src/glsl | |
parent | 43757135b281b58838224e5cef8375c22a2beee5 (diff) | |
download | external_mesa3d-a760c73853e3d1bd4243f22fa968ce21a8eea0d6.zip external_mesa3d-a760c73853e3d1bd4243f22fa968ce21a8eea0d6.tar.gz external_mesa3d-a760c73853e3d1bd4243f22fa968ce21a8eea0d6.tar.bz2 |
glsl: Add copy-constructor for ast_struct_specifier.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ast.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 3bb33c5..87f9876 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -453,6 +453,18 @@ class ast_declarator_list; class ast_struct_specifier : public ast_node { public: + /** + * \brief Make a shallow copy of an ast_struct_specifier. + * + * Use only if the objects are allocated from the same context and will not + * be modified. Zeros the inherited ast_node's fields. + */ + ast_struct_specifier(const ast_struct_specifier& that): + ast_node(), name(that.name), declarations(that.declarations) + { + /* empty */ + } + ast_struct_specifier(const char *identifier, ast_declarator_list *declarator_list); virtual void print(void) const; |