[PATCH vkd3d 2/5] include: Avoid using a field reference as a truth value.

Zebediah Figura (she/her) zfigura at codeweavers.com
Mon Jan 10 17:06:08 CST 2022


On 1/6/22 03:33, Henri Verbeet wrote:
> On Fri, 17 Dec 2021 at 19:05, Zebediah Figura <zfigura at codeweavers.com> wrote:
>>
>> Ported from 5d01ebab89cee8a3499ee00729c048068d5b719d from Wine.
>>
>> Despite the commit message there, even GCC 11.1 chokes on this.
>>
> For what it's worth, there's a single usage of RB_FOR_EACH_ENTRY in
> vkd3d, and it looks like something that doesn't particularly need it.
> We have generally preferred using rb_for_each_entry(), so we could
> also just get rid of these macros.

Is there a reason to prefer rb_for_each_entry()? It has always struck me 
as clumsier to program with callbacks, although I guess that's a matter 
of personal taste.



More information about the wine-devel mailing list