summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-06-30 21:32:00 +0300
committerAndrei Karas <akaras@inbox.ru>2013-06-30 21:32:00 +0300
commitd7bc7c661a7ed84a20cb9280b79aefa3a3839a83 (patch)
tree735d60cc5c3327a33a21ae5d3d086fcbf589eea7 /src
parentf5dfdae24c0a142b42a039d5d56ed973eda071dc (diff)
downloadmv-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.tar.gz
mv-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.tar.bz2
mv-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.tar.xz
mv-d7bc7c661a7ed84a20cb9280b79aefa3a3839a83.zip
improve size() usage in guildmanager.
Diffstat (limited to 'src')
-rw-r--r--src/guildmanager.cpp7
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)
{