Codechange: Use std::map instead of custom SmallMap.

This commit is contained in:
Peter Nelson
2023-05-16 20:50:41 +01:00
committed by PeterN
parent 72018badff
commit c38df2d589
30 changed files with 81 additions and 235 deletions

View File

@@ -548,7 +548,11 @@ struct PLYRChunkHandler : ChunkHandler {
cprops->name_1 = STR_GAME_SAVELOAD_NOT_AVAILABLE;
}
if (!_load_check_data.companies.Insert(index, cprops)) delete cprops;
if (_load_check_data.companies.count(index) == 0) {
_load_check_data.companies[index] = cprops;
} else {
delete cprops;
}
}
}