mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
compile fix
This commit is contained in:
parent
11bcc48cc3
commit
4cc28d5e91
@ -480,10 +480,11 @@ int CGameState::pickHero(PlayerColor owner)
|
||||
}
|
||||
|
||||
// we need random order to select hero
|
||||
boost::random_shuffle(factionHeroes, [](size_t range)
|
||||
auto randGen = [](size_t range)
|
||||
{
|
||||
return ran() % range;
|
||||
});
|
||||
};
|
||||
boost::random_shuffle(factionHeroes, randGen); // generator must be reference
|
||||
|
||||
if(factionHeroes.size())
|
||||
return factionHeroes.front().getNum();
|
||||
|
Loading…
x
Reference in New Issue
Block a user