diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/net/eathena/mercenaryhandler.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/net/eathena/mercenaryhandler.cpp')
-rw-r--r-- | src/net/eathena/mercenaryhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp index a14eac0ac..84eb5671c 100644 --- a/src/net/eathena/mercenaryhandler.cpp +++ b/src/net/eathena/mercenaryhandler.cpp @@ -61,8 +61,8 @@ void MercenaryHandler::move(const int x, const int y) const return; createOutPacket(CMSG_HOMMERC_MOVE_TO); outMsg.writeBeingId(id, "mercenary id"); - outMsg.writeCoordinates(static_cast<uint16_t>(x), - static_cast<uint16_t>(y), + outMsg.writeCoordinates(CAST_U16(x), + CAST_U16(y), 0U, "position"); } @@ -75,7 +75,7 @@ void MercenaryHandler::attack(const BeingId targetId, createOutPacket(CMSG_HOMMERC_ATTACK); outMsg.writeBeingId(id, "mercenary id"); outMsg.writeBeingId(targetId, "target id"); - outMsg.writeInt8(static_cast<int8_t>(keep == Keep_true ? 1 : 0), "keep"); + outMsg.writeInt8(CAST_S8(keep == Keep_true ? 1 : 0), "keep"); } void MercenaryHandler::talk(const std::string &restrict text) const @@ -90,8 +90,8 @@ void MercenaryHandler::talk(const std::string &restrict text) const const size_t sz = msg.size(); createOutPacket(CMSG_HOMMERC_TALK); - outMsg.writeInt16(static_cast<int16_t>(sz + 4 + 1), "len"); - outMsg.writeString(msg, static_cast<int>(sz), "message"); + outMsg.writeInt16(CAST_S16(sz + 4 + 1), "len"); + outMsg.writeString(msg, CAST_S32(sz), "message"); outMsg.writeInt8(0, "zero byte"); } |