assimp_cmd: Fix strict-aliasing warnings
parent
53119e74f8
commit
10f4b6f95c
|
@ -177,6 +177,17 @@ inline uint32_t Write<aiVector3D>(const aiVector3D& v)
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------------
|
||||||
|
// Serialize a color value
|
||||||
|
template <>
|
||||||
|
inline uint32_t Write<aiColor3D>(const aiColor3D& v)
|
||||||
|
{
|
||||||
|
uint32_t t = Write<float>(v.r);
|
||||||
|
t += Write<float>(v.g);
|
||||||
|
t += Write<float>(v.b);
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
// Serialize a color value
|
// Serialize a color value
|
||||||
template <>
|
template <>
|
||||||
|
@ -566,9 +577,9 @@ uint32_t WriteBinaryLight(const aiLight* l)
|
||||||
len += Write<float>(l->mAttenuationQuadratic);
|
len += Write<float>(l->mAttenuationQuadratic);
|
||||||
}
|
}
|
||||||
|
|
||||||
len += Write<aiVector3D>((const aiVector3D&)l->mColorDiffuse);
|
len += Write<aiColor3D>(l->mColorDiffuse);
|
||||||
len += Write<aiVector3D>((const aiVector3D&)l->mColorSpecular);
|
len += Write<aiColor3D>(l->mColorSpecular);
|
||||||
len += Write<aiVector3D>((const aiVector3D&)l->mColorAmbient);
|
len += Write<aiColor3D>(l->mColorAmbient);
|
||||||
|
|
||||||
if (l->mType == aiLightSource_SPOT) {
|
if (l->mType == aiLightSource_SPOT) {
|
||||||
len += Write<float>(l->mAngleInnerCone);
|
len += Write<float>(l->mAngleInnerCone);
|
||||||
|
|
Loading…
Reference in New Issue