summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-21 22:44:44 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-21 23:18:20 +0300
commit62ffd2023d9073e452fe2e2f50cf6b2f11224d6f (patch)
tree8c45c7c16b0c20ac6a7b722d69c148149e6b651f /src/gui/chatwindow.cpp
parentcfa5391c1be51ef49380e398a72c813255d6316e (diff)
downloadmanaverse-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.gz
manaverse-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.bz2
manaverse-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.tar.xz
manaverse-62ffd2023d9073e452fe2e2f50cf6b2f11224d6f.zip
next code style changes.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 21613bc73..cb3ed8da8 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -753,8 +753,8 @@ void ChatWindow::mouseReleased(gcn::MouseEvent &event A_UNUSED)
void ChatWindow::keyPressed(gcn::KeyEvent &event)
{
const int key = event.getKey().getValue();
- int actionId = static_cast<KeyEvent*>(&event)->getActionId();
- if (actionId == Input::KEY_GUI_DOWN)
+ const int actionId = static_cast<KeyEvent*>(&event)->getActionId();
+ if (actionId == static_cast<int>(Input::KEY_GUI_DOWN))
{
if (mCurHist != mHistory.end())
{
@@ -778,7 +778,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event)
mChatInput->setText("");
}
}
- else if (actionId == Input::KEY_GUI_UP &&
+ else if (actionId == static_cast<int>(Input::KEY_GUI_UP) &&
mCurHist != mHistory.begin() && !mHistory.empty())
{
// Move backward through the history
@@ -787,7 +787,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event)
mChatInput->setCaretPosition(static_cast<unsigned>(
mChatInput->getText().length()));
}
- else if (actionId == Input::KEY_GUI_INSERT &&
+ else if (actionId == static_cast<int>(Input::KEY_GUI_INSERT) &&
mChatInput->getText() != "")
{
// Add the current message to the history and clear the text
@@ -796,18 +796,18 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event)
mCurHist = mHistory.end();
mChatInput->setText("");
}
- else if (actionId == Input::KEY_GUI_TAB &&
+ else if (actionId == static_cast<int>(Input::KEY_GUI_TAB) &&
mChatInput->getText() != "")
{
autoComplete();
return;
}
- else if (actionId == Input::KEY_GUI_CANCEL &&
+ else if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL) &&
mChatInput->isVisible())
{
mChatInput->processVisible(false);
}
- else if (actionId == Input::KEY_CHAT_PREV_HISTORY &&
+ else if (actionId == static_cast<int>(Input::KEY_CHAT_PREV_HISTORY) &&
mChatInput->isVisible())
{
ChatTab *tab = getFocused();
@@ -839,7 +839,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event)
mChatInput->getText().length()));
}
}
- else if (actionId == Input::KEY_CHAT_NEXT_HISTORY &&
+ else if (actionId == static_cast<int>(Input::KEY_CHAT_NEXT_HISTORY) &&
mChatInput->isVisible())
{
ChatTab *tab = getFocused();