1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00
- fixed some warnings from cppcheck
This commit is contained in:
Ivan Savenko
2012-09-26 13:13:39 +00:00
parent 7759ed017e
commit 15a7f43e11
31 changed files with 134 additions and 198 deletions

View File

@ -187,7 +187,7 @@ DLL_LINKAGE void SetAvailableHeroes::applyGs( CGameState *gs )
for (int i = 0; i < GameConstants::AVAILABLE_HEROES_PER_PLAYER; i++)
{
CGHeroInstance *h = (hid[i]>=0 ? (CGHeroInstance*)gs->hpool.heroesPool[hid[i]] : NULL);
CGHeroInstance *h = (hid[i]>=0 ? gs->hpool.heroesPool[hid[i]].get() : nullptr);
if(h && army[i])
h->setToArmy(army[i]);
p->availableHeroes.push_back(h);