[PATCH vkd3d 1/5] vkd3d-shader/hlsl: Use list_empty() instead of comparing list_count() against zero.

Giovanni Mascellani gmascellani at codeweavers.com
Mon Dec 20 04:16:17 CST 2021


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>

On 17/12/21 18:48, Zebediah Figura wrote:
> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
> ---
>   libs/vkd3d-shader/hlsl.y | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
> index 636882c4b..5a17449a3 100644
> --- a/libs/vkd3d-shader/hlsl.y
> +++ b/libs/vkd3d-shader/hlsl.y
> @@ -326,7 +326,7 @@ static bool append_conditional_break(struct hlsl_ctx *ctx, struct list *cond_lis
>       struct hlsl_ir_if *iff;
>   
>       /* E.g. "for (i = 0; ; ++i)". */
> -    if (!list_count(cond_list))
> +    if (list_empty(cond_list))
>           return true;
>   
>       condition = node_from_list(cond_list);



More information about the wine-devel mailing list