Apply modernize-use-emplace clang-tidy rule

This commit is contained in:
Aaron Gokaslan
2022-08-23 11:41:49 -04:00
parent 04997ccbf3
commit 27edb43600
48 changed files with 302 additions and 302 deletions

View File

@@ -316,13 +316,13 @@ void SplitLargeMeshesProcess_Triangle::SplitMesh(
}
// add the newly created mesh to the list
avList.push_back(std::pair<aiMesh*, unsigned int>(pcMesh,a));
avList.emplace_back(pcMesh,a);
}
// now delete the old mesh data
delete pMesh;
} else {
avList.push_back(std::pair<aiMesh*, unsigned int>(pMesh,a));
avList.emplace_back(pMesh,a);
}
}
@@ -484,7 +484,7 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
break;
}
vFaces.push_back(aiFace());
vFaces.emplace_back();
aiFace& rFace = vFaces.back();
// setup face type and number of indices
@@ -605,7 +605,7 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
}
// add the newly created mesh to the list
avList.push_back(std::pair<aiMesh*, unsigned int>(pcMesh,a));
avList.emplace_back(pcMesh,a);
if (iBase == pMesh->mNumFaces) {
// have all faces ... finish the outer loop, too
@@ -620,5 +620,5 @@ void SplitLargeMeshesProcess_Vertex::SplitMesh(
delete pMesh;
return;
}
avList.push_back(std::pair<aiMesh*, unsigned int>(pMesh,a));
avList.emplace_back(pMesh,a);
}