summaryrefslogtreecommitdiff
path: root/src/actions/chat.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
commitef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch)
treec3d7c79fca18ac387d0c90512ef3201c92da5890 /src/actions/chat.cpp
parent22b64d16b613c1e5b26632237879b167024788ab (diff)
downloadmv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip
Move some variables to better scope.
Diffstat (limited to 'src/actions/chat.cpp')
-rw-r--r--src/actions/chat.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 442597849..307e4556e 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -669,13 +669,16 @@ impHandler(guildNotice)
return true;
}
- const std::string str1 = args.substr(0, 60);
std::string str2;
if (args.size() > 60)
str2 = args.substr(60);
const Guild *const guild = localPlayer->getGuild();
if (guild != nullptr)
- guildHandler->changeNotice(guild->getId(), str1, str2);
+ {
+ guildHandler->changeNotice(guild->getId(),
+ args.substr(0, 60),
+ str2);
+ }
return true;
}