[Mesa-dev] [PATCH 08/14] glsl: Add copy-constructor for ast_struct_specifier.

Chad Versace chad.versace at linux.intel.com
Tue Jul 9 11:48:43 PDT 2013


On 07/08/2013 11:38 AM, Matt Turner wrote:
> ---
>   src/glsl/ast.h | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> 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;
>

Patch 8 is
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>


More information about the mesa-dev mailing list