Update UnrealLoader.cpp

Fix static code analysis findings.
pull/2885/head
Kim Kulling 2020-03-27 11:30:40 +01:00 committed by GitHub
parent 96c7c567e6
commit 80323b57bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -92,7 +92,6 @@ struct Triangle {
unsigned char mTex[3][2]; // Texture UV coordinates unsigned char mTex[3][2]; // Texture UV coordinates
unsigned char mTextureNum; // Source texture offset unsigned char mTextureNum; // Source texture offset
char mFlags; // Unreal Mesh Flags (unused) char mFlags; // Unreal Mesh Flags (unused)
unsigned int matIndex; unsigned int matIndex;
}; };
@ -131,11 +130,11 @@ inline void CompressVertex(const aiVector3D &v, uint32_t &out) {
Vertex n; Vertex n;
int32_t t; int32_t t;
}; };
t = 0;
n.X = (int32_t)v.x; n.X = (int32_t)v.x;
n.Y = (int32_t)v.y; n.Y = (int32_t)v.y;
n.Z = (int32_t)v.z; n.Z = (int32_t)v.z;
::memcpy(&out, &t, sizeof(int32_t)); ::memcpy(&out, &t, sizeof(int32_t));
//out = t;
} }
// UNREAL vertex decompression // UNREAL vertex decompression
@ -153,7 +152,6 @@ inline void DecompressVertex(aiVector3D &v, int32_t in) {
} // end namespace Unreal } // end namespace Unreal
static const aiImporterDesc desc = { static const aiImporterDesc desc = {
"Unreal Mesh Importer", "Unreal Mesh Importer",
"", "",