Apply some more modernize-use-emplace

This commit is contained in:
Aaron Gokaslan
2022-09-02 11:20:02 -04:00
parent e3b01e10db
commit 411171fa45
17 changed files with 56 additions and 69 deletions

View File

@@ -1095,7 +1095,7 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) {
void LWOImporter::LoadLWO2Clip(unsigned int length) {
AI_LWO_VALIDATE_CHUNK_LENGTH(length, CLIP, 10);
mClips.push_back(LWO::Clip());
mClips.emplace_back();
LWO::Clip &clip = mClips.back();
// first - get the index of the clip
@@ -1165,7 +1165,7 @@ void LWOImporter::LoadLWO2Clip(unsigned int length) {
void LWOImporter::LoadLWO3Clip(unsigned int length) {
AI_LWO_VALIDATE_CHUNK_LENGTH(length, CLIP, 12);
mClips.push_back(LWO::Clip());
mClips.emplace_back();
LWO::Clip &clip = mClips.back();
// first - get the index of the clip
@@ -1238,7 +1238,7 @@ void LWOImporter::LoadLWO2Envelope(unsigned int length) {
LE_NCONST uint8_t *const end = mFileBuffer + length;
AI_LWO_VALIDATE_CHUNK_LENGTH(length, ENVL, 4);
mEnvelopes.push_back(LWO::Envelope());
mEnvelopes.emplace_back();
LWO::Envelope &envelope = mEnvelopes.back();
// Get the index of the envelope
@@ -1346,7 +1346,7 @@ void LWOImporter::LoadLWO3Envelope(unsigned int length) {
LE_NCONST uint8_t *const end = mFileBuffer + length;
AI_LWO_VALIDATE_CHUNK_LENGTH(length, ENVL, 4);
mEnvelopes.push_back(LWO::Envelope());
mEnvelopes.emplace_back();
LWO::Envelope &envelope = mEnvelopes.back();
// Get the index of the envelope