diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-30 21:32:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-30 21:32:00 +0300 |
commit | d7bc7c661a7ed84a20cb9280b79aefa3a3839a83 (patch) | |
tree | 735d60cc5c3327a33a21ae5d3d086fcbf589eea7 | |
parent | f5dfdae24c0a142b42a039d5d56ed973eda071dc (diff) | |
download | manaverse-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.tar.gz manaverse-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.tar.bz2 manaverse-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.tar.xz manaverse-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.zip |
improve size() usage in guildmanager.
-rw-r--r-- | src/guildmanager.cpp | 7 |
1 files 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) { |