# HG changeset patch # User unc0rr # Date 1319736798 -14400 # Node ID ef53ba8417916b6e5522e8628b6f159e0ac93b99 # Parent a6186a8ba90a8ffeb303125133bdbd812c10d79f - Remove some old unused code - Fix some warnings, including "empty if" diff -r a6186a8ba90a -r ef53ba841791 QTfrontend/game.cpp --- 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; diff -r a6186a8ba90a -r ef53ba841791 QTfrontend/game.h --- 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; diff -r a6186a8ba90a -r ef53ba841791 QTfrontend/ui/page/pageoptions.cpp --- 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(); diff -r a6186a8ba90a -r ef53ba841791 QTfrontend/ui/widget/SmartLineEdit.cpp --- 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; diff -r a6186a8ba90a -r ef53ba841791 project_files/hedgewars.pro --- 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