On 27 October 2016 at 12:46, Markus Teich <markus.te...@stusta.mhn.de> wrote:
> Anselm R Garbe wrote:
>> To me ! is logical NOT and your suggestion relies on the fact that
>> XUrgencyHint is a single bit flag? no?
>>
>> I prefer the original code, as it doesn't use side effects of logical NOTs.
>
> The `(wmh->flags & XUrgencyHint)` is used as a bool value regardless. 
> Basically
> `test_exp ? 1 : 0` seemed stupid to me. The double negation achieves the same
> thing as having the `? 1 : 0` (normalizing the output). However your argument
> with using the side effects of ! are valid, so leave it as it is.

Exactly, I prefer the original version.

Cheers,
Anselm

Reply via email to