1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Fixes from code review

This commit is contained in:
Dydzio
2024-12-05 21:16:06 +01:00
parent 7a701b39fb
commit 7be31c94f2
4 changed files with 6 additions and 13 deletions

View File

@@ -378,7 +378,10 @@ void CGTownInstance::onHeroLeave(const CGHeroInstance * h) const
std::string CGTownInstance::getObjectName() const
{
return getNameTranslated() + ", " + (ID == Obj::RANDOM_TOWN ? "Random town" : getTown()->faction->getNameTranslated());
if(ID == Obj::RANDOM_TOWN )
return CGObjectInstance::getObjectName();
return getNameTranslated() + ", " + getTown()->faction->getNameTranslated();
}
bool CGTownInstance::townEnvisagesBuilding(BuildingSubID::EBuildingSubID subId) const