[PATCH] wined3d: Handle null semantics in stream output description cache.

Nikolay Sivov nsivov at codeweavers.com
Thu Sep 9 10:58:57 CDT 2021



On 9/9/21 6:46 PM, Henri Verbeet wrote:
> On Mon, 6 Sept 2021 at 13:54, Nikolay Sivov <nsivov at codeweavers.com> wrote:
>> +        if (!!a->semantic_name ^ !!b->semantic_name)
>> +            return a->semantic_name ? -1 : 1;
> I suppose that's fine, although "if (!a->semantic_name !=
> !b->semantic_name)" would work just as well. Alternatively, we could
> do something like
>
>     if ((ret = (!a->semantic_name - !b->semantic_name)))
>         return ret;
>
> which would perhaps better fit the rest of the function.
Thanks, that looks much better. I sent a v2.



More information about the wine-devel mailing list