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

Matteo Bruni mbruni at codeweavers.com
Wed Jan 19 05:51:59 CST 2022


From: Zebediah Figura <zfigura at codeweavers.com>

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
I'm sorry for the very late signoffs. For some reason, this year
resuming work after vacation has been a real struggle. Then my usual
workflow of going through all the pending stuff before sending replies
didn't help at all.

I'm going to resend the first batch of pending patches (that look okay
to me) because:
- the oldest of the lot just fell out of the patch tracker
- I want to make some trivial changes to a few more
- it seems nice to clarify order (although the patches look mostly
independent)

I'm also going to send a bunch of comments to various, more or less
old, email threads. Most of which I had written at the time, but then
see above. I'll make it a point to change at least that going forward.

Zebediah and Giovanni's reviews and comments that have been flowing in
the meantime have been very helpful and you can assume that I agree
if I don't say otherwise.

 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 636882c4..5a17449a 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);
-- 
2.34.1




More information about the wine-devel mailing list