Apply some more modernize-use-emplace
This commit is contained in:
@@ -153,7 +153,7 @@ void DeboneProcess::Execute( aiScene* pScene)
|
||||
}
|
||||
else {
|
||||
// Mesh is kept unchanged - store it's new place in the mesh array
|
||||
mSubMeshIndices[a].push_back(std::pair<unsigned int,aiNode*>(static_cast<unsigned int>(meshes.size()),(aiNode*)0));
|
||||
mSubMeshIndices[a].emplace_back(static_cast<unsigned int>(meshes.size()), (aiNode *)0);
|
||||
meshes.push_back(srcMesh);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ VertexWeightTable *ComputeVertexBoneWeightTable(const aiMesh *pMesh) {
|
||||
aiBone *bone = pMesh->mBones[i];
|
||||
for (unsigned int a = 0; a < bone->mNumWeights; ++a) {
|
||||
const aiVertexWeight &weight = bone->mWeights[a];
|
||||
avPerVertexWeights[weight.mVertexId].push_back(std::pair<unsigned int, float>(i, weight.mWeight));
|
||||
avPerVertexWeights[weight.mVertexId].emplace_back(i, weight.mWeight);
|
||||
}
|
||||
}
|
||||
return avPerVertexWeights;
|
||||
|
||||
@@ -309,7 +309,7 @@ void SortByPTypeProcess::Execute(aiScene *pScene) {
|
||||
VertexWeightTable &tbl = avw[idx];
|
||||
for (VertexWeightTable::const_iterator it = tbl.begin(), end = tbl.end();
|
||||
it != end; ++it) {
|
||||
tempBones[(*it).first].push_back(aiVertexWeight(outIdx, (*it).second));
|
||||
tempBones[(*it).first].emplace_back(outIdx, (*it).second);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ void SplitByBoneCountProcess::SplitMesh( const aiMesh* pMesh, std::vector<aiMesh
|
||||
if (bone->mWeights[b].mWeight > 0.0f)
|
||||
{
|
||||
int vertexId = bone->mWeights[b].mVertexId;
|
||||
vertexBones[vertexId].push_back( BoneWeight( a, bone->mWeights[b].mWeight));
|
||||
vertexBones[vertexId].emplace_back(a, bone->mWeights[b].mWeight);
|
||||
if (vertexBones[vertexId].size() > mMaxBoneCount)
|
||||
{
|
||||
throw DeadlyImportError("SplitByBoneCountProcess: Single face requires more bones than specified max bone count!");
|
||||
|
||||
@@ -434,7 +434,7 @@ void TextureTransformStep::Execute( aiScene* pScene)
|
||||
for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) {
|
||||
if (ref[n])
|
||||
continue;
|
||||
trafo.push_back(STransformVecInfo());
|
||||
trafo.emplace_back();
|
||||
trafo.back().uvIndex = n;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user