[Mesa-dev] [PATCH 12/14] glsl: Add an is_declaration field to ast_struct_specifier.

Ian Romanick idr at freedesktop.org
Thu Jul 11 16:11:59 PDT 2013


On 07/11/2013 04:09 PM, Matt Turner wrote:
> On Thu, Jul 11, 2013 at 3:53 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> On 06/29/2013 07:44 PM, Matt Turner wrote:
>>> +   bool is_declaration;
>>
>> Does this need to be explicitly initialized to false in the constructor?
>
> It's initialized to true in the hunk below, since except for later
> uses in this series all ast_struct_specifiers are declarations of a
> struct.

Right.  I misread it the first time.

> I did notice that this version is missing this hunk that I have locally:
>
> --- a/src/glsl/ast.h
> +++ b/src/glsl/ast.h
> @@ -460,7 +460,8 @@ public:
>       * 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)
> +      ast_node(), name(that.name), declarations(that.declarations),
> +      is_declaration(that.is_declaration)
>      {
>         /* empty */
>      }
>



More information about the mesa-dev mailing list