From aa52cb10b4013769f76a68ef81ed0865005fb258 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 2 Feb 2021 16:11:16 -0600 Subject: [PATCH] vkd3d-shader: Return void from hlsl_pop_scope(). Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Matteo Bruni Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/hlsl.c | 6 ++---- libs/vkd3d-shader/hlsl.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index ddc690ef..4a8cf696 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -537,15 +537,13 @@ void hlsl_push_scope(struct hlsl_parse_ctx *ctx) list_add_tail(&ctx->scopes, &new_scope->entry); } -BOOL hlsl_pop_scope(struct hlsl_parse_ctx *ctx) +void hlsl_pop_scope(struct hlsl_parse_ctx *ctx) { struct hlsl_scope *prev_scope = ctx->cur_scope->upper; - if (!prev_scope) - return FALSE; + assert(prev_scope); TRACE("Popping current scope.\n"); ctx->cur_scope = prev_scope; - return TRUE; } static int compare_param_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2) diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 138ab4ee..656698bb 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -646,7 +646,7 @@ void hlsl_report_message(const struct source_location loc, enum hlsl_error_level level, const char *fmt, ...) VKD3D_PRINTF_FUNC(3,4) DECLSPEC_HIDDEN; void hlsl_push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; -BOOL hlsl_pop_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; +void hlsl_pop_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; struct hlsl_type *hlsl_type_clone(struct hlsl_type *old, unsigned int default_majority) DECLSPEC_HIDDEN; BOOL hlsl_type_compare(const struct hlsl_type *t1, const struct hlsl_type *t2) DECLSPEC_HIDDEN;