Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Core/Movie: Use fmt where applicable #8180
This is split into its own PR, as it makes mild changes to some of the internal functions in Movie.cpp (namely changing
Because of that, we amend some functions to operate on
While we do have this library as part of the public linkage interface in the common library target, which will be used in the future for the logging macros, we should still be explicit that we're using this library. Therefore, we privately link it in to be explicit about it.
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.