1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Const-transitiveness of CGI almost reached

This commit is contained in:
mateuszb
2010-12-20 13:04:24 +00:00
parent b15deaa203
commit 8b831c1f46
11 changed files with 63 additions and 53 deletions

View File

@ -266,7 +266,7 @@ DLL_EXPORT void RemoveObject::applyGs( CGameState *gs )
if(obj->ID==HEROI_TYPE)
{
CGHeroInstance *h = static_cast<CGHeroInstance*>(obj);
std::vector<CGHeroInstance*>::iterator nitr = std::find(gs->map->heroes.begin(), gs->map->heroes.end(),h);
std::vector<ConstTransitivePtr<CGHeroInstance> >::iterator nitr = std::find(gs->map->heroes.begin(), gs->map->heroes.end(),h);
gs->map->heroes.erase(nitr);
int player = h->tempOwner;
nitr = std::find(gs->getPlayer(player)->heroes.begin(), gs->getPlayer(player)->heroes.end(), h);