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/actions/chat.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/actions/chat.cpp') 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; } -- cgit v1.2.3-60-g2f50