fix warnings detected in vs2017.

pull/3012/head
kimkulling 2020-03-19 12:58:41 +01:00
parent 68f7f545a9
commit 4d917c97bd
3 changed files with 19 additions and 19 deletions

View File

@ -828,11 +828,11 @@ void glTF2Exporter::ExportMeshes()
for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) { for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) {
pPositionDiff[vt] = pAnimMesh->mVertices[vt] - aim->mVertices[vt]; pPositionDiff[vt] = pAnimMesh->mVertices[vt] - aim->mVertices[vt];
} }
Ref<Accessor> v = ExportData(*mAsset, meshId, b, Ref<Accessor> vec = ExportData(*mAsset, meshId, b,
pAnimMesh->mNumVertices, pPositionDiff, pAnimMesh->mNumVertices, pPositionDiff,
AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
if (v) { if (vec) {
p.targets[am].position.push_back(v); p.targets[am].position.push_back(vec);
} }
delete[] pPositionDiff; delete[] pPositionDiff;
} }
@ -843,11 +843,11 @@ void glTF2Exporter::ExportMeshes()
for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) { for (unsigned int vt = 0; vt < pAnimMesh->mNumVertices; ++vt) {
pNormalDiff[vt] = pAnimMesh->mNormals[vt] - aim->mNormals[vt]; pNormalDiff[vt] = pAnimMesh->mNormals[vt] - aim->mNormals[vt];
} }
Ref<Accessor> v = ExportData(*mAsset, meshId, b, Ref<Accessor> vec = ExportData(*mAsset, meshId, b,
pAnimMesh->mNumVertices, pNormalDiff, pAnimMesh->mNumVertices, pNormalDiff,
AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT); AttribType::VEC3, AttribType::VEC3, ComponentType_FLOAT);
if (v) { if (vec) {
p.targets[am].normal.push_back(v); p.targets[am].normal.push_back(vec);
} }
delete[] pNormalDiff; delete[] pNormalDiff;
} }