QTfrontend/team.cpp
branchflibqtfrontend
changeset 8133 2d0f56423eb3
parent 8130 4cab13c82b4e
child 8363 0b4ac686fc44
--- a/QTfrontend/team.cpp	Tue Nov 27 00:29:41 2012 +0400
+++ b/QTfrontend/team.cpp	Tue Nov 27 10:05:24 2012 +0400
@@ -35,19 +35,19 @@
     QList<QByteArray> baList;
 
     flib_team team;
-    bzero(&team, sizeof(team));
+    memset(&team, 0, sizeof(team));
     baList << teamname.toUtf8();
     team.name = baList.last().data();
-    team.grave = "Statue";
-    team.fort = "Plane";
-    team.voicepack = "Default";
-    team.flag = "hedgewars";
+    team.grave = const_cast<char *>("Statue");
+    team.fort = const_cast<char *>("Plane");
+    team.voicepack = const_cast<char *>("Default");
+    team.flag = const_cast<char *>("hedgewars");
 
     for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++)
     {
         baList << QLineEdit::tr("hedgehog %1").arg(i+1).toUtf8();
         team.hogs[i].name = baList.last().data();
-        team.hogs[i].hat = "NoHat";
+        team.hogs[i].hat = const_cast<char *>("NoHat");
     }
 
     m_oldTeamName = teamname;
@@ -74,7 +74,7 @@
     // net teams are configured from QStringList
     if(strLst.size() != 23) throw HWTeamConstructException();
     flib_team team;
-    bzero(&team, sizeof(team));
+    memset(&team, 0, sizeof(team));
 
     for(int i = 0; i < 6; ++i)
         baList << strLst[i].toUtf8();
@@ -94,7 +94,7 @@
 
         QString hat = strLst[i * 2 + 8];
         if (hat.isEmpty())
-            team.hogs[i].hat = "NoHat";
+            team.hogs[i].hat = const_cast<char *>("NoHat");
         else
         {
             baList << hat.toUtf8();