summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-23 15:43:15 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-23 15:43:33 +0300
commite252f8d84e9b9c69bc02c128be5141407e928117 (patch)
treef42c3865f9aaecac710c029dcc8976887aa38d82 /src/gui
parent00d118d22446b52fd7453d934869996b32693c71 (diff)
downloadmv-e252f8d84e9b9c69bc02c128be5141407e928117.tar.gz
mv-e252f8d84e9b9c69bc02c128be5141407e928117.tar.bz2
mv-e252f8d84e9b9c69bc02c128be5141407e928117.tar.xz
mv-e252f8d84e9b9c69bc02c128be5141407e928117.zip
Fix compilation with gcc 4.4 or older.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/sdlinput.cpp12
-rw-r--r--src/gui/widgets/dropdown.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_colors.cpp6
-rw-r--r--src/gui/widgets/textbox.cpp6
-rw-r--r--src/gui/widgets/textfield.cpp12
-rw-r--r--src/gui/windows/charcreatedialog.cpp6
-rw-r--r--src/gui/windows/charselectdialog.cpp6
-rw-r--r--src/gui/windows/chatwindow.cpp6
-rw-r--r--src/gui/windows/killstats.cpp6
-rw-r--r--src/gui/windows/ministatuswindow.cpp6
-rw-r--r--src/gui/windows/quitdialog.cpp6
-rw-r--r--src/gui/windows/serverdialog.cpp6
-rw-r--r--src/gui/windows/statuswindow.cpp6
-rw-r--r--src/gui/windows/whoisonline.cpp6
14 files changed, 48 insertions, 48 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index 42c61b5de..7b0d7dca9 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -333,8 +333,8 @@ int SDLInput::convertKeyCharacter(const SDL_Event &event)
int value = keysym.unicode;
#endif
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (keysym.sym)
{
case SDLK_TAB:
@@ -496,12 +496,12 @@ int SDLInput::convertKeyCharacter(const SDL_Event &event)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
if (!(CAST_U32(keysym.mod) & KMOD_NUM))
{
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (keysym.sym)
{
case SDLK_KP0:
@@ -537,7 +537,7 @@ int SDLInput::convertKeyCharacter(const SDL_Event &event)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
return value;
}
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 9648b97c0..c4c15a303 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -332,8 +332,8 @@ void DropDown::keyPressed(KeyEvent& event)
return;
const InputActionT actionId = event.getActionId();
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (actionId)
{
case InputAction::GUI_SELECT:
@@ -364,7 +364,7 @@ void DropDown::keyPressed(KeyEvent& event)
default:
return;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
event.consume();
}
diff --git a/src/gui/widgets/tabs/setup_colors.cpp b/src/gui/widgets/tabs/setup_colors.cpp
index 8235aab2b..d2f51afe5 100644
--- a/src/gui/widgets/tabs/setup_colors.cpp
+++ b/src/gui/widgets/tabs/setup_colors.cpp
@@ -288,8 +288,8 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
// probably need combite both switches and add all mssing color ids.
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (type)
{
case UserColorId::AIR_COLLISION_HIGHLIGHT:
@@ -364,7 +364,7 @@ void Setup_Colors::valueChanged(const SelectionEvent &event A_UNUSED)
mGradDelaySlider->setScale(20, 100);
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
if (grad != GradientType::STATIC && grad != GradientType::PULSE)
{ // If nonstatic color, don't display the current, but the committed
// color at the sliders
diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp
index abb03a1ca..13cb07da9 100644
--- a/src/gui/widgets/textbox.cpp
+++ b/src/gui/widgets/textbox.cpp
@@ -257,8 +257,8 @@ void TextBox::keyPressed(KeyEvent& event)
const Key &key = event.getKey();
const InputActionT action = event.getActionId();
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (action)
{
case InputAction::GUI_LEFT:
@@ -432,7 +432,7 @@ void TextBox::keyPressed(KeyEvent& event)
break;
}
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
adjustSize();
scrollToCaret();
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 34c088540..4060f8d1a 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -396,8 +396,8 @@ void TextField::keyPressed(KeyEvent &event)
bool TextField::handleNormalKeys(const InputActionT action, bool &consumed)
{
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (action)
{
case InputAction::GUI_LEFT:
@@ -477,14 +477,14 @@ bool TextField::handleNormalKeys(const InputActionT action, bool &consumed)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
return true;
}
void TextField::handleCtrlKeys(const InputActionT action, bool &consumed)
{
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (action)
{
case InputAction::GUI_LEFT:
@@ -575,7 +575,7 @@ void TextField::handleCtrlKeys(const InputActionT action, bool &consumed)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
void TextField::moveCaretBack()
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 6f88b8388..b172f788c 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -823,8 +823,8 @@ void CharCreateDialog::updatePlayer()
void CharCreateDialog::keyPressed(KeyEvent &event)
{
const InputActionT actionId = event.getActionId();
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (actionId)
{
case InputAction::GUI_CANCEL:
@@ -836,7 +836,7 @@ void CharCreateDialog::keyPressed(KeyEvent &event)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
void CharCreateDialog::setButtonsPosition(const int w, const int h)
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 6ecee2257..95bb964d1 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -337,8 +337,8 @@ void CharSelectDialog::use(const int selected)
void CharSelectDialog::keyPressed(KeyEvent &event)
{
const InputActionT actionId = event.getActionId();
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (actionId)
{
case InputAction::GUI_CANCEL:
@@ -428,7 +428,7 @@ void CharSelectDialog::keyPressed(KeyEvent &event)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
/**
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 7a4867441..b4b73ff23 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -979,8 +979,8 @@ void ChatWindow::attributeChanged(const AttributesT id,
{
if (!mShowBattleEvents)
return;
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (id)
{
case Attributes::EXP:
@@ -1003,7 +1003,7 @@ void ChatWindow::attributeChanged(const AttributesT id,
default:
break;
};
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
void ChatWindow::addInputText(const std::string &text, const bool space)
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 22d977723..0269f9fcb 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -405,8 +405,8 @@ void KillStats::attributeChanged(const AttributesT id,
const int oldVal,
const int newVal)
{
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (id)
{
case Attributes::EXP:
@@ -438,5 +438,5 @@ void KillStats::attributeChanged(const AttributesT id,
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 7168846a0..267401707 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -270,8 +270,8 @@ void MiniStatusWindow::attributeChanged(const AttributesT id,
const int oldVal A_UNUSED,
const int newVal A_UNUSED)
{
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (id)
{
case Attributes::HP:
@@ -296,7 +296,7 @@ void MiniStatusWindow::attributeChanged(const AttributesT id,
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
void MiniStatusWindow::updateStatus()
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 4049d74fc..cda477346 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -205,8 +205,8 @@ void QuitDialog::keyPressed(KeyEvent &event)
const InputActionT actionId = event.getActionId();
int dir = 0;
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (actionId)
{
case InputAction::GUI_SELECT:
@@ -225,7 +225,7 @@ void QuitDialog::keyPressed(KeyEvent &event)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
if (dir != 0)
{
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index b326e2f91..158d5909e 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -310,8 +310,8 @@ void ServerDialog::action(const ActionEvent &event)
void ServerDialog::keyPressed(KeyEvent &event)
{
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (event.getActionId())
{
case InputAction::GUI_CANCEL:
@@ -356,7 +356,7 @@ void ServerDialog::keyPressed(KeyEvent &event)
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
if (!event.isConsumed())
mServersList->keyPressed(event);
}
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index c2f54bfd1..979da2859 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -309,8 +309,8 @@ void StatusWindow::attributeChanged(const AttributesT id,
const int oldVal A_UNUSED,
const int newVal)
{
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (id)
{
case Attributes::HP:
@@ -370,7 +370,7 @@ void StatusWindow::attributeChanged(const AttributesT id,
default:
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
}
void StatusWindow::setPointsNeeded(const AttributesT id,
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index bde463d74..2698ef918 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -565,8 +565,8 @@ int WhoIsOnline::downloadThread(void *ptr)
if ((res = curl_easy_perform(curl)) != 0)
{
wio->mDownloadStatus = UPDATE_ERROR;
- PRAGMA("GCC diagnostic push")
- PRAGMA("GCC diagnostic ignored \"-Wswitch-enum\"")
+ PRAGMA45("GCC diagnostic push")
+ PRAGMA45("GCC diagnostic ignored \"-Wswitch-enum\"")
switch (res)
{
case CURLE_COULDNT_CONNECT:
@@ -577,7 +577,7 @@ int WhoIsOnline::downloadThread(void *ptr)
<< url.c_str() << std::endl;
break;
}
- PRAGMA("GCC diagnostic pop")
+ PRAGMA45("GCC diagnostic pop")
attempts++;
curl_easy_cleanup(curl);
curl_slist_free_all(pHeaders);