2 ms·
I think you can probably get by with an array of function pointers, and bittwiddling to get values. For example, if i is the ENUM code that was passed, then 1
by lsiebert 10y ago
I think you can probably get by with an array of function pointers, and bittwiddling to get values.
For example, if i is the ENUM code that was passed, then 1 ^ ((unsigned int)i >> (sizeof(int) * sizeof(char) - 1)) will be 0 if negative and 1 if positive or zero.