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

Reduce usage of implicit conversions to int

This commit is contained in:
Ivan Savenko
2025-04-19 16:12:07 +03:00
parent 4d57a8ed36
commit 829739da24
64 changed files with 220 additions and 200 deletions

View File

@@ -199,7 +199,7 @@ size_t CComponent::getIndex() const
case ComponentType::LUCK:
return std::clamp(data.value.value_or(0) + 3, 0, 6);
case ComponentType::BUILDING:
return data.subType.as<BuildingTypeUniqueID>().getBuilding();
return data.subType.as<BuildingTypeUniqueID>().getBuilding().getNum();
case ComponentType::HERO_PORTRAIT:
return LIBRARY->heroTypes()->getById(data.subType.as<HeroTypeID>())->getIconIndex();
case ComponentType::FLAG: