From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/net/eathena/homunculushandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/eathena/homunculushandler.cpp') diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp index 26b7ed618..9837eccb5 100644 --- a/src/net/eathena/homunculushandler.cpp +++ b/src/net/eathena/homunculushandler.cpp @@ -61,8 +61,8 @@ void HomunculusHandler::move(const int x, const int y) const return; createOutPacket(CMSG_HOMMERC_MOVE_TO); outMsg.writeBeingId(id, "homunculus id"); - outMsg.writeCoordinates(static_cast(x), - static_cast(y), + outMsg.writeCoordinates(CAST_U16(x), + CAST_U16(y), 0U, "position"); } @@ -75,7 +75,7 @@ void HomunculusHandler::attack(const BeingId targetId, createOutPacket(CMSG_HOMMERC_ATTACK); outMsg.writeBeingId(id, "homunculus id"); outMsg.writeBeingId(targetId, "target id"); - outMsg.writeInt8(static_cast(keep == Keep_true ? 1 : 0), "keep"); + outMsg.writeInt8(CAST_S8(keep == Keep_true ? 1 : 0), "keep"); } void HomunculusHandler::feed() const @@ -104,8 +104,8 @@ void HomunculusHandler::talk(const std::string &restrict text) const const size_t sz = msg.size(); createOutPacket(CMSG_HOMMERC_TALK); - outMsg.writeInt16(static_cast(sz + 4 + 1), "len"); - outMsg.writeString(msg, static_cast(sz), "message"); + outMsg.writeInt16(CAST_S16(sz + 4 + 1), "len"); + outMsg.writeString(msg, CAST_S32(sz), "message"); outMsg.writeInt8(0, "zero byte"); } -- cgit v1.2.3-60-g2f50