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
[RDY] Cpp fmt #1562
Introduces clang-format and new style for C++, based closely on Googles style.
Rules not enforced by clang-format e.g. including braces on conditionals are not yet included.
Some other minor issues (compiler warnings, non-portable casts) are resolved in this patch set.
* Break up / shorten some long lines * Add some missing braces for clarity * Multiline strings are merged to let clang-format split them appropriately. * sdl_core's frame_count changed from a C style array to std::array which made the length checks simpler. * Add includes and forward declairs to avoid transitive dependencies * Remove th_gfx_font.h include from th_gfx.h - circular dependencies * using to shorten lines in th_map.cpp * Avoid non-portable reinterpret_cast for parcels in th_map. * Use more constants in th_map. * Use class initializer for th_map classes
I don't quite like the large amount of lines that get created with function definitions and function applications, it's systematic and all that, but having two lines for
For function applications, I can see the idea, especially if an argument is more than a simple variable or value. For function definitions, I see no use. There is a piece of documentation that explains each parameter in calling order already.