From fc854786ed73fe768d6a3ca22c02f7013560a930 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Aug 2012 21:35:49 +0300 Subject: Fix code style. --- src/gui/chatwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/chatwindow.cpp') 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(""); -- cgit v1.2.3-60-g2f50