summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-08 23:02:06 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-08 23:02:06 +0300
commit7e66a4606bb15d98197f71245fe191d03152ee5f (patch)
tree825022571cfb55d70f1ca3c142f79db3758fb72b /src/gui/windows/chatwindow.cpp
parenta61ac4664d55cddb18d2d861e76629bd07676129 (diff)
downloadmv-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.gz
mv-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.bz2
mv-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.xz
mv-7e66a4606bb15d98197f71245fe191d03152ee5f.zip
Improve some empty string checks.
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r--src/gui/windows/chatwindow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 1551c10ae..5be54a6f9 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -801,7 +801,7 @@ void ChatWindow::keyPressed(KeyEvent &event)
mChatInput->getText().length()));
}
else if (actionId == InputAction::GUI_INSERT &&
- mChatInput->getText() != "")
+ !mChatInput->getText().empty())
{
// Add the current message to the history and clear the text
if (mHistory.empty() || mChatInput->getText() != mHistory.back())
@@ -1505,7 +1505,7 @@ std::string ChatWindow::autoCompleteHistory(const std::string &partName) const
f++;
line = line.substr(0, f);
- if (line != "")
+ if (!line.empty())
nameList.push_back(line);
++i;