# HG changeset patch # User unc0rr # Date 1338151416 -14400 # Node ID c0c787eb526ea628b1269699a8533bc966feb572 # Parent fcab1fd02bc63d5b15b424dbe1205095d1fe316f Make frontend compile with clang diff -r fcab1fd02bc6 -r c0c787eb526e QTfrontend/team.cpp --- a/QTfrontend/team.cpp Sun May 27 23:42:43 2012 +0400 +++ b/QTfrontend/team.cpp Mon May 28 00:43:36 2012 +0400 @@ -37,6 +37,7 @@ OldTeamName = m_name; for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { + m_hedgehogs.append(HWHog()); m_hedgehogs[i].Name = (QLineEdit::tr("hedgehog %1").arg(i+1)); m_hedgehogs[i].Hat = "NoHat"; } @@ -46,6 +47,7 @@ m_flag = "hedgewars"; for(int i = 0; i < BINDS_NUMBER; i++) { + m_binds.append(BindAction()); m_binds[i].action = cbinds[i].action; m_binds[i].strbind = cbinds[i].strbind; } @@ -70,6 +72,7 @@ m_difficulty = strLst[6].toUInt(); for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { + m_hedgehogs.append(HWHog()); m_hedgehogs[i].Name=strLst[i * 2 + 7]; m_hedgehogs[i].Hat=strLst[i * 2 + 8]; // Somehow claymore managed an empty hat. Until we figure out how, this should avoid a repeat @@ -90,6 +93,7 @@ m_name = QString("Team"); for (int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { + m_hedgehogs.append(HWHog()); m_hedgehogs[i].Name.sprintf("hedgehog %d", i); m_hedgehogs[i].Hat = "NoHat"; } @@ -101,6 +105,7 @@ for(int i = 0; i < BINDS_NUMBER; i++) { + m_binds.append(BindAction()); m_binds[i].action = cbinds[i].action; m_binds[i].strbind = cbinds[i].strbind; } diff -r fcab1fd02bc6 -r c0c787eb526e QTfrontend/team.h --- a/QTfrontend/team.h Sun May 27 23:42:43 2012 +0400 +++ b/QTfrontend/team.h Mon May 28 00:43:36 2012 +0400 @@ -113,9 +113,9 @@ QString m_fort; QString m_flag; QString m_voicepack; - HWHog m_hedgehogs[HEDGEHOGS_PER_TEAM]; + QList m_hedgehogs; quint8 m_difficulty; - BindAction m_binds[BINDS_NUMBER]; + QList m_binds; // class members that contain info for the current game setup quint8 m_numHedgehogs;