--- a/QTfrontend/game.cpp Mon Apr 11 01:30:43 2011 +0200
+++ b/QTfrontend/game.cpp Mon Apr 11 11:22:10 2011 -0400
@@ -82,8 +82,8 @@
if (m_pTeamSelWidget)
{
- QList<HWTeam> teams = m_pTeamSelWidget->getPlayingTeams();
- for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it)
+ QListIterator<HWTeam> it(m_pTeamSelWidget->getPlayingTeams());
+ while(it.hasNext())
{
HWProto::addStringToBuffer(buf, QString("eammloadt %1").arg(ammostr.mid(0, cAmmoNumber)));
HWProto::addStringToBuffer(buf, QString("eammprob %1").arg(ammostr.mid(cAmmoNumber, cAmmoNumber)));
@@ -91,7 +91,8 @@
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).TeamGameConfig(gamecfg->getInitHealth()));
+ it.next().TeamGameConfig(gamecfg->getInitHealth()));
+ ;
}
}
RawSendIPC(buf);
@@ -389,9 +390,9 @@
if (m_pTeamSelWidget)
{
QByteArray buf;
- QList<HWTeam> teams = m_pTeamSelWidget->getPlayingTeams();
- for(QList<HWTeam>::iterator it = teams.begin(); it != teams.end(); ++it)
- HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg((*it).TeamName));
+ QListIterator<HWTeam> it(m_pTeamSelWidget->getPlayingTeams());
+ while(it.hasNext())
+ HWProto::addStringToBuffer(buf, QString("eteamgone %1").arg(it.next().TeamName));
RawSendIPC(buf);
}
}