The following is not intended to generate a holy war, but merely a place for me to remind myself of the decisions I took along the way to get to a consistent style for any new code that I write.
#pragma warning( push, 3 ) #include <stdio.h> #pragma warning( pop ) // /Wall Used. Compiler warnings turned off. #pragma warning (disable : 5045) // Spectre code insertion warning. class entity { static constexpr size_t _maxEntities = 1000; entity(char* name) { _name = name; }; void set() char _name[8]; }; inline float _floor(const float& a) { if (a == 0.0f) return 0.0f; return floorf(a); }Continue reading “C++ Coding Standards”