1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Remove explicit convesion to int in operators

This commit is contained in:
Ivan Savenko
2023-11-05 18:58:07 +02:00
parent 10e110320b
commit abad4b01ce
35 changed files with 97 additions and 105 deletions

View File

@@ -160,12 +160,12 @@ std::string CampaignScenarioID::encode(const si32 index)
return std::to_string(index);
}
std::string Obj::encode(int32_t index)
std::string MapObjectID::encode(int32_t index)
{
return VLC->objtypeh->getObjectHandlerName(index);
return VLC->objtypeh->getObjectHandlerName(MapObjectID(index));
}
si32 Obj::decode(const std::string & identifier)
si32 MapObjectID::decode(const std::string & identifier)
{
auto rawId = VLC->identifiers()->getIdentifier(ModScope::scopeGame(), "objects", identifier);
if(rawId)