Wrong object is created here!

If I'm not mistaken. Because this is originally push_back(aniMeshVertex) instead of push_back(v).
And the fact that aniMeshVertex is just getting created and destroyed for nothing.
It need to be replaced with this then? A Clang-tidy syntax to create the same aniMeshVertex.

I found this in pull request #4527 I think it may need to be reviewed too.
pull/4704/head
J.G.Adams 2022-08-26 19:12:11 -04:00 committed by GitHub
parent 46e571e497
commit 9cd723e282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -345,8 +345,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) {
uniqueVertices.push_back(v);
if (hasAnimMeshes) {
for (unsigned int animMeshIndex = 0; animMeshIndex < pMesh->mNumAnimMeshes; animMeshIndex++) {
Vertex aniMeshVertex(pMesh->mAnimMeshes[animMeshIndex], a);
uniqueAnimatedVertices[animMeshIndex].push_back(v);
uniqueAnimatedVertices[animMeshIndex].emplace_back(pMesh->mAnimMeshes[animMeshIndex], a);
}
}
} else{