3 ms·
I deal with similar code, although for me, "!= 0" is usually discouraged; I would just use the result of & in a condition later, or if it must be turned into 0
by userbinator 7y ago
I deal with similar code, although for me, "!= 0" is usually discouraged; I would just use the result of & in a condition later, or if it must be turned into 0 and 1, the "booleanise" operator:
const bool press = !!(evt->flags & EVT_FLAG_PRESS);