1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +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

@@ -528,13 +528,10 @@ void CMapFormatJson::serializePlayerInfo(JsonSerializeFormat & handler)
{
std::string temp;
if(hero->type)
{
temp = hero->type->getJsonKey();
}
else
{
temp = VLC->heroh->objects[hero->subID]->getJsonKey();
}
temp = hero->getHeroType().toEntity(VLC)->getJsonKey();
handler.serializeString("type", temp);
}
}
@@ -753,7 +750,7 @@ void CMapFormatJson::writeDisposedHeroes(JsonSerializeFormat & handler)
for(DisposedHero & hero : map->disposedHeroes)
{
std::string type = HeroTypeID::encode(hero.heroId);
std::string type = HeroTypeID::encode(hero.heroId.getNum());
auto definition = definitions->enterStruct(type);