QTfrontend/game.cpp
changeset 5772 c09c50efe8b5
parent 5289 9d18b61bd3eb
child 5781 1fa54e5ea479
--- a/QTfrontend/game.cpp	Sun Sep 04 13:36:59 2011 -0400
+++ b/QTfrontend/game.cpp	Sun Sep 04 21:39:50 2011 +0400
@@ -84,8 +84,7 @@
 
     if (m_pTeamSelWidget)
     {
-        QListIterator<HWTeam> it(m_pTeamSelWidget->getPlayingTeams());
-        while(it.hasNext())
+        foreach(HWTeam team, m_pTeamSelWidget->getPlayingTeams())
         {
             HWProto::addStringToBuffer(buf, QString("eammloadt %1").arg(ammostr.mid(0, cAmmoNumber)));
             HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
@@ -93,7 +92,7 @@
             HWProto::addStringToBuffer(buf, QString("eammreinf %1").arg(ammostr.mid(3 * cAmmoNumber, cAmmoNumber)));
             if(!gamecfg->schemeData(21).toBool()) HWProto::addStringToBuffer(buf, QString("eammstore"));
             HWProto::addStringListToBuffer(buf,
-                it.next().TeamGameConfig(gamecfg->getInitHealth()));
+                team.TeamGameConfig(gamecfg->getInitHealth()));
             ;
         }
     }
@@ -392,9 +391,8 @@
     if (m_pTeamSelWidget)
     {
         QByteArray buf;
-        QListIterator<HWTeam> it(m_pTeamSelWidget->getPlayingTeams());
-        while(it.hasNext())
-            HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(it.next().TeamName));
+        foreach(HWTeam team, m_pTeamSelWidget->getPlayingTeams())
+            HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(team.TeamName));
         RawSendIPC(buf);
     }
 }