diff --git a/code/PostProcessing/JoinVerticesProcess.cpp b/code/PostProcessing/JoinVerticesProcess.cpp index 30831eed0..3bf96afeb 100644 --- a/code/PostProcessing/JoinVerticesProcess.cpp +++ b/code/PostProcessing/JoinVerticesProcess.cpp @@ -264,13 +264,12 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) { // We should care only about used vertices, not all of them // (this can happen due to original file vertices buffer being used by // multiple meshes) - std::vector usedVertexIndicesMask; - usedVertexIndicesMask.resize((pMesh->mNumVertices + 31) / 32, 0); + std::vector usedVertexIndicesMask; + usedVertexIndicesMask.resize(pMesh->mNumVertices, false); for (unsigned int a = 0; a < pMesh->mNumFaces; a++) { aiFace& face = pMesh->mFaces[a]; for (unsigned int b = 0; b < face.mNumIndices; b++) { - const unsigned int currIndex = face.mIndices[b]; - usedVertexIndicesMask[currIndex / 32] |= 1u << (currIndex % 32); + usedVertexIndicesMask[face.mIndices[b]] = true; } } @@ -336,7 +335,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) { int newIndex = 0; for( unsigned int a = 0; a < pMesh->mNumVertices; a++) { // if the vertex is unused Do nothing - if (0 == (usedVertexIndicesMask[a / 32] & (1u << (a % 32)))) { + if (!usedVertexIndicesMask[a]) { continue; } // collect the vertex data