Open agarny opened 5 years ago
As a rule of thumb this is correct - if a variable is only used for bitwise operations it is safer to keep it unsigned. As a matter of fact, I would go even further and use specific length-preset types, like u_int32 to ensure same length regardless of the platform/compiler/model used.
Bitwise operations can be done on
ModifierFlags
, which means thatModifierFlags
should be anunsigned int
rather than anint
, as reported by thehicpp-signed-bitwise
check using Clang-Tidy.