|
|
|
|
|
by kazinator
2066 days ago
|
|
> warning C4146: unary minus operator applied to unsigned type, result still unsigned #ifdef _MSVC
x = ~x + 1; // "Manual" two's complement to avoid warning.
#else
x = -x; // Regular two's complement any good C coder knows
#endif
|
|