diff --git a/common/lc_colors.h b/common/lc_colors.h index abcbb5ad..c3e921ed 100644 --- a/common/lc_colors.h +++ b/common/lc_colors.h @@ -55,13 +55,13 @@ bool lcLoadColorFile(lcFile& File); int lcGetColorIndex(quint32 ColorCode); int lcGetBrickLinkColor(int ColorIndex); -inline constexpr quint32 lcGetColorCodeFromExtendedColor(int Color) +inline quint32 lcGetColorCodeFromExtendedColor(int Color) { const int ConverstionTable[] = { 4, 12, 2, 10, 1, 9, 14, 15, 8, 0, 6, 13, 13, 334, 36, 44, 34, 42, 33, 41, 46, 47, 7, 382, 6, 13, 11, 383 }; return ConverstionTable[Color]; } -inline constexpr quint32 lcGetColorCodeFromOriginalColor(int Color) +inline quint32 lcGetColorCodeFromOriginalColor(int Color) { const int ConverstionTable[] = { 0, 2, 4, 9, 7, 6, 22, 8, 10, 11, 14, 16, 18, 9, 21, 20, 22, 8, 10, 11 }; return lcGetColorCodeFromExtendedColor(ConverstionTable[Color]); diff --git a/common/lc_mesh.cpp b/common/lc_mesh.cpp index d3cfe706..084d6ad4 100644 --- a/common/lc_mesh.cpp +++ b/common/lc_mesh.cpp @@ -227,7 +227,7 @@ bool lcMesh::MinIntersectDist(const lcVector3& Start, const lcVector3& End, floa } template -bool lcMesh::IntersectsPlanes(const lcVector4 Planes[6]) +bool lcMesh::IntersectsPlanes(const lcVector4 (&Planes)[6]) { lcVertex* Verts = (lcVertex*)mVertexData; @@ -248,7 +248,7 @@ bool lcMesh::IntersectsPlanes(const lcVector4 Planes[6]) return false; } -bool lcMesh::IntersectsPlanes(const lcVector4 Planes[6]) +bool lcMesh::IntersectsPlanes(const lcVector4 (&Planes)[6]) { if (mIndexType == GL_UNSIGNED_SHORT) return IntersectsPlanes(Planes); diff --git a/common/lc_mesh.h b/common/lc_mesh.h index c32e6e35..2a88d036 100644 --- a/common/lc_mesh.h +++ b/common/lc_mesh.h @@ -90,8 +90,8 @@ public: bool MinIntersectDist(const lcVector3& Start, const lcVector3& End, float& MinDist); template - bool IntersectsPlanes(const lcVector4 Planes[6]); - bool IntersectsPlanes(const lcVector4 Planes[6]); + bool IntersectsPlanes(const lcVector4 (&Planes)[6]); + bool IntersectsPlanes(const lcVector4 (&Planes)[6]); int GetLodIndex(float Distance) const; diff --git a/common/object.h b/common/object.h index 6f9d5e1c..44412a96 100644 --- a/common/object.h +++ b/common/object.h @@ -148,11 +148,9 @@ protected: template void ChangeKey(lcArray>& Keys, const T& Value, lcStep Step, bool AddKey) { - lcObjectKey* Key; - for (int KeyIdx = 0; KeyIdx < Keys.GetSize(); KeyIdx++) { - Key = &Keys[KeyIdx]; + lcObjectKey* Key = &Keys[KeyIdx]; if (Key->Step == Step) { @@ -179,14 +177,14 @@ protected: if (AddKey || Keys.GetSize() == 0) { - Key = &Keys.Add(); + lcObjectKey* Key = &Keys.Add(); Key->Step = Step; Key->Value = Value; } else { - Key = &Keys[Keys.GetSize() - 1]; + lcObjectKey* Key = &Keys[Keys.GetSize() - 1]; Key->Value = Value; } }