I just found this in Microsoft's guiddef.h header file:
__inline bool operator==(REFGUID guidOne, REFGUID guidOther)
{
return !!IsEqualGUID(guidOne,guidOther);
}
Is there any point to the !!
, or was some dev just feeling cute that day?
It turns off Visual C++ silly performance warning for the conversion to boolean.
In this particular case, Alf is probably right.
Otherwise it is common idiom to standardize integer values to either 1 (if they start nonzero) or 0 (if they start as zero) for logical operations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With