Apply modernize-use-emplace clang-tidy rule
This commit is contained in:
@@ -319,7 +319,7 @@ void Discreet3DSImporter::ParseObjectChunk() {
|
||||
case Discreet3DS::CHUNK_MAT_MATERIAL:
|
||||
|
||||
// Add a new material to the list
|
||||
mScene->mMaterials.push_back(D3DS::Material(std::string("UNNAMED_" + ai_to_string(mScene->mMaterials.size()))));
|
||||
mScene->mMaterials.emplace_back(std::string("UNNAMED_" + ai_to_string(mScene->mMaterials.size())));
|
||||
ParseMaterialChunk();
|
||||
break;
|
||||
|
||||
@@ -370,7 +370,7 @@ void Discreet3DSImporter::ParseChunk(const char *name, unsigned int num) {
|
||||
switch (chunk.Flag) {
|
||||
case Discreet3DS::CHUNK_TRIMESH: {
|
||||
// this starts a new triangle mesh
|
||||
mScene->mMeshes.push_back(D3DS::Mesh(std::string(name, num)));
|
||||
mScene->mMeshes.emplace_back(std::string(name, num));
|
||||
|
||||
// Read mesh chunks
|
||||
ParseMeshChunk();
|
||||
@@ -999,7 +999,7 @@ void Discreet3DSImporter::ParseMeshChunk() {
|
||||
mMesh.mFaces.reserve(num);
|
||||
while (num-- > 0) {
|
||||
// 3DS faces are ALWAYS triangles
|
||||
mMesh.mFaces.push_back(D3DS::Face());
|
||||
mMesh.mFaces.emplace_back();
|
||||
D3DS::Face &sFace = mMesh.mFaces.back();
|
||||
|
||||
sFace.mIndices[0] = (uint16_t)stream->GetI2();
|
||||
|
||||
Reference in New Issue
Block a user