summaryrefslogtreecommitdiff
path: root/src/net/eathena/homunculushandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/net/eathena/homunculushandler.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/net/eathena/homunculushandler.cpp')
-rw-r--r--src/net/eathena/homunculushandler.cpp10
1 files changed, 5 insertions, 5 deletions
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<uint16_t>(x),
- static_cast<uint16_t>(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<int8_t>(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<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");
}