mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-07 06:40:12 +00:00
c64fe7df65
In a few cases we needed to alter... less than ideal parameter types. While u8 may have been OK with printf-style formatting, which promotes most smaller types back to int, this won't work with fmt. fmt preserves the type of the passed in arguments, meaning that u8, being an alias of uint8_t (itself being an alias of unsigned char on all the platforms we support), will print out as a character, not a numeric value. As such, we amend some functions to operate on u32 values for two reasons: 1. We actually want it to print out as a value 2. Arithmetic on unsigned types smaller than unsigned int will actually promote to an int, not unsigned int. This is very non-obvious to some and makes for error-prone code. < sizeof(int) types are great for storage, not so much for performing unsigned arithmetic, despite the signedness of the type.