summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-01 21:35:49 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-01 22:40:36 +0300
commitfc854786ed73fe768d6a3ca22c02f7013560a930 (patch)
tree3a12f555d194679957559760567ff8eb701b494b /src/gui/chatwindow.cpp
parent09d74d9273cca445b7019edacaff53452a1eee3c (diff)
downloadplus-fc854786ed73fe768d6a3ca22c02f7013560a930.tar.gz
plus-fc854786ed73fe768d6a3ca22c02f7013560a930.tar.bz2
plus-fc854786ed73fe768d6a3ca22c02f7013560a930.tar.xz
plus-fc854786ed73fe768d6a3ca22c02f7013560a930.zip
Fix code style.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 75ec6d09c..0229f9da5 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -845,11 +845,12 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event)
ChatTab *tab = getFocused();
if (tab && tab->hasRows())
{
- if (mChatHistoryIndex + 1 < tab->getRows().size())
+ const size_t tabSize = tab->getRows().size();
+ if (mChatHistoryIndex + 1 < tabSize)
{
mChatHistoryIndex ++;
}
- else if (mChatHistoryIndex < tab->getRows().size())
+ else if (mChatHistoryIndex < tabSize)
{
mChatHistoryIndex ++;
mChatInput->setText("");