mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-21 10:51:10 +00:00
mark vectors as used when their members are used
This commit is contained in:
parent
b476a3deca
commit
eec61af381
1 changed files with 7 additions and 1 deletions
8
parser.c
8
parser.c
|
@ -1412,8 +1412,14 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
|
|||
parseerror(parser, "unexpected ident: %s", parser_tokval(parser));
|
||||
goto onerr;
|
||||
}
|
||||
if (ast_istype(var, ast_value))
|
||||
if (ast_istype(var, ast_value)) {
|
||||
((ast_value*)var)->uses++;
|
||||
}
|
||||
else if (ast_istype(var, ast_member)) {
|
||||
ast_member *mem = (ast_member*)var;
|
||||
if (ast_istype(mem->owner, ast_value))
|
||||
((ast_value*)(mem->owner))->uses++;
|
||||
}
|
||||
vec_push(sy.out, syexp(parser_ctx(parser), var));
|
||||
DEBUGSHUNTDO(con_out("push %s\n", parser_tokval(parser)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue