- Remove some old unused code
authorunc0rr
Thu, 27 Oct 2011 21:33:18 +0400
changeset 6217 ef53ba841791
parent 6216 a6186a8ba90a
child 6218 999215ca87d7
- Remove some old unused code - Fix some warnings, including "empty if"
QTfrontend/game.cpp
QTfrontend/game.h
QTfrontend/ui/page/pageoptions.cpp
QTfrontend/ui/widget/SmartLineEdit.cpp
project_files/hedgewars.pro
--- a/QTfrontend/game.cpp	Thu Oct 27 02:47:05 2011 +0200
+++ b/QTfrontend/game.cpp	Thu Oct 27 21:33:18 2011 +0400
@@ -41,7 +41,6 @@
 {
     this->config = config;
     this->gamecfg = gamecfg;
-    TeamCount = 0;
     netSuspend = false;
 }
 
@@ -316,13 +315,6 @@
     return arguments;
 }
 
-void HWGame::AddTeam(const QString & teamname)
-{
-    if (TeamCount == 5) return;
-    teams[TeamCount] = teamname;
-    TeamCount++;
-}
-
 void HWGame::PlayDemo(const QString & demofilename, bool isSave)
 {
     gameType = isSave ? gtSave : gtDemo;
--- a/QTfrontend/game.h	Thu Oct 27 02:47:05 2011 +0200
+++ b/QTfrontend/game.h	Thu Oct 27 21:33:18 2011 +0400
@@ -87,9 +87,7 @@
         gtSave     = 7,
     };
     char msgbuf[MAXMSGCHARS];
-    QString teams[5];
     QString ammostr;
-    int TeamCount;
     GameUIConfig * config;
     GameCFGWidget * gamecfg;
     TeamSelWidget* m_pTeamSelWidget;
--- a/QTfrontend/ui/page/pageoptions.cpp	Thu Oct 27 02:47:05 2011 +0200
+++ b/QTfrontend/ui/page/pageoptions.cpp	Thu Oct 27 21:33:18 2011 +0400
@@ -448,6 +448,8 @@
 
 void PageOptions::setQuality(int value)
 {
+	Q_UNUSED(value);
+
     int index = this->CBStereoMode->currentIndex();
     if (index == 0)
         previousQuality = this->SLQuality->value();
@@ -455,6 +457,8 @@
 
 void PageOptions::setFullscreen(int state)
 {
+	Q_UNUSED(state);
+
     int index = this->CBStereoMode->currentIndex();
     if (index != 7 && index != 8 && index != 9)
         previousFullscreenValue = this->CBFullscreen->isChecked();
@@ -462,6 +466,8 @@
 
 void PageOptions::setResolution(int state)
 {
+	Q_UNUSED(state);
+
     int index = this->CBStereoMode->currentIndex();
     if (index != 7 && index != 8 && index != 9)
         previousResolutionIndex = this->CBResolution->currentIndex();
--- a/QTfrontend/ui/widget/SmartLineEdit.cpp	Thu Oct 27 02:47:05 2011 +0200
+++ b/QTfrontend/ui/widget/SmartLineEdit.cpp	Thu Oct 27 21:33:18 2011 +0400
@@ -199,7 +199,7 @@
                 match = cmd;
 
                 // move match to end so next time new matches will be preferred
-                if (m_cmds->removeAll(cmd) > 0);
+				if (m_cmds->removeAll(cmd) > 0)
                     m_cmds->append(cmd);
 
                 break;
@@ -218,7 +218,7 @@
                 isNick = true;
 
                 // move match to end so next time new matches will be prefered
-                if (m_nicks->removeAll(nick) > 0);
+				if (m_nicks->removeAll(nick) > 0)
                     m_nicks->append(nick);
 
                 break;
--- a/project_files/hedgewars.pro	Thu Oct 27 02:47:05 2011 +0200
+++ b/project_files/hedgewars.pro	Thu Oct 27 21:33:18 2011 +0400
@@ -70,9 +70,9 @@
     ../QTfrontend/ui/widget/weaponItem.h \
     ../QTfrontend/ui/widget/gamecfgwidget.h \
     ../QTfrontend/ui/widget/mapContainer.h \
-    ../QTfrontend/ui/widget/HistoryLineEdit.h \
+	../QTfrontend/ui/widget/HistoryLineEdit.h \
     ../QTfrontend/ui/widget/SmartLineEdit.h \
-    ../QTfrontend/ui/util/HWDataManager.h \
+	../QTfrontend/util/HWDataManager.h \
     ../QTfrontend/net/netregister.h \
     ../QTfrontend/net/netserver.h \
     ../QTfrontend/net/netudpwidget.h \
@@ -147,7 +147,7 @@
     ../QTfrontend/ui/widget/mapContainer.cpp \
     ../QTfrontend/ui/widget/HistoryLineEdit.cpp \
     ../QTfrontend/ui/widget/SmartLineEdit.cpp \
-    ../QTfrontend/ui/util/HWDataManager.cpp \
+	../QTfrontend/util/HWDataManager.cpp \
     ../QTfrontend/net/tcpBase.cpp \
     ../QTfrontend/net/netregister.cpp \
     ../QTfrontend/net/proto.cpp \
@@ -166,7 +166,7 @@
     ../QTfrontend/HWApplication.cpp \
     ../QTfrontend/hwform.cpp \
     ../QTfrontend/main.cpp \
-    ../QTfrontend/util/SDLInteraction.h.cpp \
+	../QTfrontend/util/SDLInteraction.cpp \
     ../QTfrontend/team.cpp \
     ../QTfrontend/ui_hwform.cpp \
     ../QTfrontend/hwconsts.cpp