mirror of
https://github.com/leozide/leocad
synced 2025-01-18 22:26:44 +01:00
gcc fix.
This commit is contained in:
parent
7275c4256d
commit
b9662dd3e0
4 changed files with 9 additions and 11 deletions
|
@ -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]);
|
||||
|
|
|
@ -227,7 +227,7 @@ bool lcMesh::MinIntersectDist(const lcVector3& Start, const lcVector3& End, floa
|
|||
}
|
||||
|
||||
template<typename IndexType>
|
||||
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<GLushort>(Planes);
|
||||
|
|
|
@ -90,8 +90,8 @@ public:
|
|||
bool MinIntersectDist(const lcVector3& Start, const lcVector3& End, float& MinDist);
|
||||
|
||||
template<typename IndexType>
|
||||
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;
|
||||
|
||||
|
|
|
@ -148,11 +148,9 @@ protected:
|
|||
template<typename T>
|
||||
void ChangeKey(lcArray<lcObjectKey<T>>& Keys, const T& Value, lcStep Step, bool AddKey)
|
||||
{
|
||||
lcObjectKey<T>* Key;
|
||||
|
||||
for (int KeyIdx = 0; KeyIdx < Keys.GetSize(); KeyIdx++)
|
||||
{
|
||||
Key = &Keys[KeyIdx];
|
||||
lcObjectKey<T>* Key = &Keys[KeyIdx];
|
||||
|
||||
if (Key->Step == Step)
|
||||
{
|
||||
|
@ -179,14 +177,14 @@ protected:
|
|||
|
||||
if (AddKey || Keys.GetSize() == 0)
|
||||
{
|
||||
Key = &Keys.Add();
|
||||
lcObjectKey<T>* Key = &Keys.Add();
|
||||
|
||||
Key->Step = Step;
|
||||
Key->Value = Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
Key = &Keys[Keys.GetSize() - 1];
|
||||
lcObjectKey<T>* Key = &Keys[Keys.GetSize() - 1];
|
||||
Key->Value = Value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue