Fixed compilation issue.

"insert_or_assign" was not defined in the Visual Studio 2013 toolset.
pull/2838/head
Marc-Antoine Lortie 2019-12-17 15:12:19 -05:00
parent 4144a222d3
commit a45e13b183
2 changed files with 3 additions and 3 deletions

View File

@ -665,7 +665,7 @@ void HL1MDLLoader::read_meshes() {
*/
auto AddTrivertToBone = [&](int bone, short trivert_index) {
if (bone_triverts.count(bone) == 0)
bone_triverts.insert_or_assign(bone, std::set<short>{ trivert_index });
bone_triverts.insert({ bone, std::set<short>{ trivert_index }});
else
bone_triverts[bone].insert(trivert_index);
};
@ -681,7 +681,7 @@ void HL1MDLLoader::read_meshes() {
short new_trivert_index = static_cast<short>(triverts.size());
if (triverts_similars.count(trivert.vertindex) == 0)
triverts_similars.insert_or_assign(trivert.vertindex, std::set<short>{ new_trivert_index });
triverts_similars.insert({ trivert.vertindex, std::set<short>{ new_trivert_index }});
else
triverts_similars[trivert.vertindex].insert(new_trivert_index);

View File

@ -146,7 +146,7 @@ void UniqueNameGenerator::make_unique(std::vector<std::string> &names) {
// Map each unique name to it's duplicate.
if (names_to_duplicates.count(names[i]) == 0)
names_to_duplicates.insert_or_assign(names[i], DuplicateInfo());
names_to_duplicates.insert({ names[i], DuplicateInfo()});
else
names_to_duplicates[names[i]].indices.push_back(i);
}