ptr->type = var.type;
if(var.init_expression)
ptr->init_expression = var.init_expression;
+ if(var.layout)
+ {
+ if(ptr->layout)
+ {
+ for(vector<Layout::Qualifier>::iterator i=var.layout->qualifiers.begin(); i!=var.layout->qualifiers.end(); ++i)
+ {
+ bool found = false;
+ for(vector<Layout::Qualifier>::iterator j=ptr->layout->qualifiers.begin(); (!found && j!=ptr->layout->qualifiers.end()); ++j)
+ if(j->identifier==i->identifier)
+ {
+ j->value = i->value;
+ found = true;
+ }
+
+ if(!found)
+ ptr->layout->qualifiers.push_back(*i);
+ }
+ }
+ else
+ ptr->layout = var.layout;
+ }
remove_node = true;
}
else