1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Merge pull request #4824 from IvanSavenko/translate_fix

Fixes for issues with translations
This commit is contained in:
Ivan Savenko
2024-10-28 12:56:50 +02:00
committed by GitHub
29 changed files with 1026 additions and 850 deletions

View File

@@ -208,6 +208,9 @@ void CMapLoaderH3M::readHeader()
// optimization - load mappings only once to avoid slow parsing of map headers for map list
static const std::map<EMapFormat, MapIdentifiersH3M> identifierMappers = generateMappings();
if (!identifierMappers.count(mapHeader->version))
throw std::runtime_error("Unsupported map format! Format ID " + std::to_string(static_cast<int>(mapHeader->version)));
const MapIdentifiersH3M & identifierMapper = identifierMappers.at(mapHeader->version);
reader->setIdentifierRemapper(identifierMapper);