Use BOOST_FOREACH instead of an index-based loop

This commit is contained in:
Olivier Teulière 2012-12-05 21:23:25 +01:00
parent e34cc25fe1
commit 8b3d6b9872

View file

@ -126,11 +126,11 @@ void FreeGame::start()
ASSERT(getNPlayers(), "Cannot start a game without any player");
// Set the initial racks of the players
for (unsigned int i = 0; i < getNPlayers(); i++)
BOOST_FOREACH(Player *player, m_players)
{
const PlayedRack &newRack =
helperSetRackRandom(getPlayer(i).getCurrentRack(), false, RACK_NEW);
Command *pCmd = new PlayerRackCmd(*m_players[i], newRack);
helperSetRackRandom(player->getCurrentRack(), false, RACK_NEW);
Command *pCmd = new PlayerRackCmd(*player, newRack);
accessNavigation().addAndExecute(pCmd);
}