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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user