diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-05-22 02:06:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-05-22 02:06:53 +0300 |
commit | f471f7b1afe1343b601a3476cd6b7dac577eca63 (patch) | |
tree | 36bb8b101d0793f00178e1febaf81a9a9bad8275 | |
parent | dd8699688fc642e5a99cc58948620cc096aa74b3 (diff) | |
download | manaverse-f471f7b1afe1343b601a3476cd6b7dac577eca63.tar.gz manaverse-f471f7b1afe1343b601a3476cd6b7dac577eca63.tar.bz2 manaverse-f471f7b1afe1343b601a3476cd6b7dac577eca63.tar.xz manaverse-f471f7b1afe1343b601a3476cd6b7dac577eca63.zip |
Fix some implicit casts.
-rw-r--r-- | src/net/eathena/npchandler.cpp | 2 | ||||
-rw-r--r-- | src/progs/manaplus/actions/actions.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index c7783f363..7ec80433a 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -370,7 +370,7 @@ void NpcHandler::requestAirship(const std::string &mapName, return; createOutPacket(CMSG_PRIVATE_AIRSHIP_REQUEST); outMsg.writeString(mapName, 16, "map name"); - outMsg.writeInt16(itemId, "item"); + outMsg.writeInt16(CAST_S16(itemId), "item"); } } // namespace EAthena diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp index 83068a61c..28c901ab7 100644 --- a/src/progs/manaplus/actions/actions.cpp +++ b/src/progs/manaplus/actions/actions.cpp @@ -1695,7 +1695,7 @@ impHandler(useItem) StringVect pars; if (!splitParameters(pars, event.args, " ,", '\"')) return false; - const int sz = pars.size(); + const int sz = CAST_S32(pars.size()); if (sz < 1) return false; @@ -1711,13 +1711,13 @@ impHandler(useItem) StringVect pars2; if (!splitParameters(pars2, pars[0], " ,", '\"')) return false; - const int sz2 = pars2.size(); + const int sz2 = CAST_S32(pars2.size()); if (sz2 < 1) return false; if (sz2 >= 2) color = fromInt(atoi(pars2[1].c_str()), ItemColor); if (sz >= 2) - useType = atoi(pars[1].c_str()); + useType = CAST_S16(atoi(pars[1].c_str())); const Item *const item = inv->findItem(itemId, color); logger->log("test: %d,%d, %d", itemId, CAST_S32(color), CAST_S32(useType)); |