diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
commit | ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch) | |
tree | c3d7c79fca18ac387d0c90512ef3201c92da5890 /src/gui/widgets/tabs/chat | |
parent | 22b64d16b613c1e5b26632237879b167024788ab (diff) | |
download | manaplus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz manaplus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2 manaplus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz manaplus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip |
Move some variables to better scope.
Diffstat (limited to 'src/gui/widgets/tabs/chat')
-rw-r--r-- | src/gui/widgets/tabs/chat/whispertab.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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) |