diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-30 02:05:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-01 03:11:26 +0300 |
commit | a39f63cdfa5ce15b22f294a8bb1db3a036ce462d (patch) | |
tree | 4de71bde947cae0cf5d3196cd97e82f5bc537c5c /src/guildmanager.cpp | |
parent | 02ec4369acfbf261236631e20dbb76131e7889f8 (diff) | |
download | plus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.gz plus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.bz2 plus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.tar.xz plus-a39f63cdfa5ce15b22f294a8bb1db3a036ce462d.zip |
One part of fixes after auto checking.
Diffstat (limited to 'src/guildmanager.cpp')
-rw-r--r-- | src/guildmanager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp index 9a4437934..e7ca24587 100644 --- a/src/guildmanager.cpp +++ b/src/guildmanager.cpp @@ -273,8 +273,8 @@ bool GuildManager::process(std::string msg) if (!guild) return false; // logger->log("welcome message: %s", msg.c_str()); - int pos = msg.find("! ("); - if (pos == static_cast<int>(std::string::npos)) + std::string::size_type pos = msg.find("! ("); + if (pos == std::string::npos) return false; msg = msg.substr(0, pos); guild->setName(msg); @@ -290,8 +290,8 @@ bool GuildManager::process(std::string msg) Guild *guild = createGuild(); if (!guild) return false; - int pos = msg.find("Access Level: "); - if (pos == (int)std::string::npos) + std::string::size_type pos = msg.find("Access Level: "); + if (pos == std::string::npos) return false; msg = msg.substr(pos); @@ -299,7 +299,7 @@ bool GuildManager::process(std::string msg) return false; pos = msg.find(", Guild:"); - if (pos == static_cast<int>(std::string::npos)) + if (pos == std::string::npos) return false; int level = atoi(msg.substr(0, pos).c_str()); @@ -310,7 +310,7 @@ bool GuildManager::process(std::string msg) msg = msg.substr(pos + strlen(", Guild:")); pos = msg.find(", No. Of Online Players: "); - if (pos == static_cast<int>(std::string::npos)) + if (pos == std::string::npos) return false; msg = msg.substr(0, pos); |