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
+4 -4
View File
@@ -510,7 +510,7 @@ void SceneCombiner::MergeScenes(aiScene **_dest, aiScene *master, std::vector<At
OffsetNodeMeshIndices(node, offset[n]);
}
if (n) // src[0] is the master node
nodes.push_back(NodeAttachmentInfo(node, srcList[n - 1].attachToNode, n));
nodes.emplace_back(node, srcList[n - 1].attachToNode, n);
// add name prefixes?
if (flags & AI_INT_MERGE_SCENE_GEN_UNIQUE_NAMES) {
@@ -685,19 +685,19 @@ void SceneCombiner::BuildUniqueBoneList(std::list<BoneWithHash> &asBones,
for (; it2 != end2; ++it2) {
if ((*it2).first == itml) {
(*it2).pSrcBones.push_back(BoneSrcIndex(p, iOffset));
(*it2).pSrcBones.emplace_back(p, iOffset);
break;
}
}
if (end2 == it2) {
// need to begin a new bone entry
asBones.push_back(BoneWithHash());
asBones.emplace_back();
BoneWithHash &btz = asBones.back();
// setup members
btz.first = itml;
btz.second = &p->mName;
btz.pSrcBones.push_back(BoneSrcIndex(p, iOffset));
btz.pSrcBones.emplace_back(p, iOffset);
}
}
iOffset += (*it)->mNumVertices;