On Wed, 19 Jan 2022 at 13:48, Giovanni Mascellani
<gmascellani(a)codeweavers.com> wrote:
Il 19/01/22 13:02, Matteo Bruni ha scritto:
Ech, this
is hard to read, how about a simpler:
if (instr->modifier_count > 0)
token |= VKD3D_SM4_INSTRUCTION_MODIFIER;
Or even
if (instr->modifier_count)
token |= VKD3D_SM4_INSTRUCTION_MODIFIER;
Not a big deal, but between these two I like Zeb's version more, in that
it makes more explicit that we're dealing with a number and not with a
boolean condition.
Actually, that's the reason I prefer the other variant; "Does the
instruction have modifiers?" vs "Is the number of modifiers larger
than <x>?".