From 7e66a4606bb15d98197f71245fe191d03152ee5f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Feb 2016 23:02:06 +0300 Subject: Improve some empty string checks. --- src/net/tmwa/chathandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/net/tmwa/chathandler.cpp') diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 61a8054ba..7d22102fc 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -100,7 +100,7 @@ void ChatHandler::sendRaw(const std::string &args) const std::string str; MessageOut *outMsg = nullptr; - if (line == "") + if (line.empty()) return; size_t pos = line.find(" "); @@ -129,7 +129,7 @@ void ChatHandler::sendRaw(const std::string &args) const line = line.substr(pos + 1); pos = line.find(" "); } - if (line != "") + if (!line.empty()) processRaw(*outMsg, line); delete outMsg; } -- cgit v1.2.3-60-g2f50