From 9cd723e282252a05fb99c609550f88b3057d6242 Mon Sep 17 00:00:00 2001 From: "J.G.Adams" <82924084+JG-Adams@users.noreply.github.com> Date: Fri, 26 Aug 2022 19:12:11 -0400 Subject: [PATCH] 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. --- code/PostProcessing/JoinVerticesProcess.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/PostProcessing/JoinVerticesProcess.cpp b/code/PostProcessing/JoinVerticesProcess.cpp index 745ce1a5e..84e742115 100644 --- a/code/PostProcessing/JoinVerticesProcess.cpp +++ b/code/PostProcessing/JoinVerticesProcess.cpp @@ -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{