On 9/9/21 6:46 PM, Henri Verbeet wrote:
On Mon, 6 Sept 2021 at 13:54, Nikolay Sivov nsivov@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.