vkd3d-shader: Replace assert() with VKD3D_ASSERT() in preproc.l.

This commit is contained in:
Giovanni Mascellani 2024-08-02 10:34:34 +02:00 committed by Henri Verbeet
parent 351220f182
commit 625327653b
Notes: Henri Verbeet 2024-08-05 16:15:48 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/976

View File

@ -408,7 +408,7 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
} }
ctx->last_was_eof = false; ctx->last_was_eof = false;
assert(ctx->file_count); VKD3D_ASSERT(ctx->file_count);
if (!(token = preproc_lexer_lex(lval, lloc, scanner))) if (!(token = preproc_lexer_lex(lval, lloc, scanner)))
{ {
ctx->last_was_eof = true; ctx->last_was_eof = true;
@ -646,7 +646,7 @@ int yylex(YYSTYPE *lval, YYLTYPE *lloc, yyscan_t scanner)
{ {
struct preproc_text *current_arg = NULL; struct preproc_text *current_arg = NULL;
assert(func_state->macro->arg_count); VKD3D_ASSERT(func_state->macro->arg_count);
if (func_state->arg_count < func_state->macro->arg_count) if (func_state->arg_count < func_state->macro->arg_count)
current_arg = &func_state->macro->arg_values[func_state->arg_count]; current_arg = &func_state->macro->arg_values[func_state->arg_count];