Conversation
|
Devil's advocate: does this make a difference in codegen outside of non-optimizing builds (i.e. debug without On the whole, this is probably better for consistency. It's easier to miss a non-zero constant in the explicit initializer form. One thing I'd like to see is for the Final thought: the all-uppercase naming is appropriate for enumeration constants and macros, but as this is neither a macro nor an enum I think |
|
This was initially less about the quality of code gen and was more of a quality of life coding change for me. It was really annoying me seeing all of these calls to I've now done the matrix classes |
9f3dc24 to
955f047
Compare
955f047 to
fc9d8ad
Compare
Added a static const member variable for
ZEROZerovalues to vector3 and replaced all instances of usingvector3d(0, 0, 0)in the code I could find.Did not do the same for cases of
vector3f(0.f, 0.f, 0.f)as this often made sense in the situatiuns that it is used.EDIT:
Changed the usage of
matrix3x3::Identity()andmatrix4x4::Identity()static functions to be a static const member namedIdentityand theIdentity()renamed toIdentityFunc(). Also deleted the lightly usedmatrix4x4fIdentityand other values in favour ofmatrix4x4f::Identity