From ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Aug 2017 22:51:23 +0300 Subject: Move some variables to better scope. --- src/gui/widgets/tabs/chat/whispertab.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/tabs') diff --git a/src/gui/widgets/tabs/chat/whispertab.cpp b/src/gui/widgets/tabs/chat/whispertab.cpp index d8672b22d..73b73a17c 100644 --- a/src/gui/widgets/tabs/chat/whispertab.cpp +++ b/src/gui/widgets/tabs/chat/whispertab.cpp @@ -71,11 +71,11 @@ void WhisperTab::handleCommandStr(const std::string &msg) const size_t pos = msg.find(' '); const std::string type(msg, 0, pos); - const std::string args(msg, pos == std::string::npos - ? msg.size() : pos + 1); if (type == "me") { + const std::string args(msg, pos == std::string::npos + ? msg.size() : pos + 1); std::string str = textToMe(args); chatHandler->privateMessage(mNick, str); if (localPlayer != nullptr) -- cgit v1.2.3-60-g2f50