diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-09 17:52:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-09 17:52:58 +0300 |
commit | 2fc2ae36225bbf7279e5093e236f2c16a674285d (patch) | |
tree | 021c0079ac65029446caccb4f2d9432427c4ce35 /src | |
parent | 6b60e9b14ff3cadcf12e0f487eb7b389fa9c81e4 (diff) | |
download | plus-2fc2ae36225bbf7279e5093e236f2c16a674285d.tar.gz plus-2fc2ae36225bbf7279e5093e236f2c16a674285d.tar.bz2 plus-2fc2ae36225bbf7279e5093e236f2c16a674285d.tar.xz plus-2fc2ae36225bbf7279e5093e236f2c16a674285d.zip |
Fix compilation warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/npchandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/npchandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 2 | ||||
-rw-r--r-- | src/utils/stringutils.cpp | 4 | ||||
-rw-r--r-- | src/utils/stringutils.h | 2 |
7 files changed, 7 insertions, 9 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 414c6e4df..60b93f89e 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -186,7 +186,7 @@ void ChatHandler::processRaw(MessageOut &restrict outMsg, if (line.size() < 2) return; - const int i = parseNumber(line.substr(1)); + const uint32_t i = parseNumber(line.substr(1)); switch (tolower(line[0])) { case 'b': diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index b22b0d804..3f844a025 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -61,8 +61,6 @@ NpcHandler::NpcHandler() : void NpcHandler::handleMessage(Net::MessageIn &msg) { - int npcId = 0; - switch (msg.getId()) { case SMSG_NPC_CHOICE: diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 895468b4b..197661d08 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -207,7 +207,7 @@ void ChatHandler::processRaw(MessageOut &restrict outMsg, if (line.size() < 2) return; - int i = parseNumber(line.substr(1)); + const uint32_t i = parseNumber(line.substr(1)); switch (tolower(line[0])) { case 'b': diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp index b70d1d8b2..0e2701f44 100644 --- a/src/net/tmwa/npchandler.cpp +++ b/src/net/tmwa/npchandler.cpp @@ -343,7 +343,7 @@ void NpcHandler::processNpcCommand(Net::MessageIn &msg) void NpcHandler::processChangeTitle(Net::MessageIn &msg) { - const int npcId = getNpc(msg); + getNpc(msg); mRequestLang = false; const std::string str = msg.readString(); if (mDialog) diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 8d86a88a7..44fe8836c 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -247,7 +247,7 @@ void PlayerHandler::removeOption() const { } -void PlayerHandler::changeCart(const int type) const +void PlayerHandler::changeCart(const int type A_UNUSED) const { } diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 5674abfd9..b308a5abe 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -747,9 +747,9 @@ bool parse2Int(const std::string &args, int &x, int &y) return isValid; } -int parseNumber(const std::string &str) +uint32_t parseNumber(const std::string &str) { - int i = 0; + uint32_t i = 0; int idx = 0; if (strStartWith(str, "0x")) idx = 2; diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h index cf729c345..caf3869e0 100644 --- a/src/utils/stringutils.h +++ b/src/utils/stringutils.h @@ -240,6 +240,6 @@ void secureChatCommand(std::string &str); bool parse2Int(const std::string &args, int &x, int &y); -int parseNumber(const std::string &str); +uint32_t parseNumber(const std::string &str); #endif // UTILS_STRINGUTILS_H |