From d7bc7c661a7ed84a20cb9280b79aefa3a3839a83 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 30 Jun 2013 21:32:00 +0300 Subject: improve size() usage in guildmanager. --- src/guildmanager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp index da11ece1b..62b478a5a 100644 --- a/src/guildmanager.cpp +++ b/src/guildmanager.cpp @@ -179,11 +179,12 @@ void GuildManager::updateList() while (it != it_end) { std::string name = *it; - if (name.size() > 1) + const size_t sz = name.size(); + if (sz > 1) { - const int status = atoi(name.substr(name.size() - 1).c_str()); + const int status = atoi(name.substr(sz - 1).c_str()); - name = name.substr(0, name.size() - 1); + name = name.substr(0, sz - 1); GuildMember *const m = guild->addMember(i, 0, name); if (m) { -- cgit v1.2.3-70-g09d2