1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Prevent shadowing of function arguments by local vars

This commit is contained in:
Michał Janiszewski
2018-10-29 16:56:14 +01:00
parent e814aca29f
commit 7be9aa4868
11 changed files with 28 additions and 28 deletions

View File

@ -277,9 +277,9 @@ void CHeroList::update(const CGHeroInstance * hero)
listBox->resize(LOCPLINT->wanderingHeroes.size());
if (adventureInt->selection)
{
auto hero = dynamic_cast<const CGHeroInstance *>(adventureInt->selection);
if (hero)
select(hero);
auto selectedHero = dynamic_cast<const CGHeroInstance *>(adventureInt->selection);
if (selectedHero)
select(selectedHero);
}
CList::update();
}