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/tmwa/charserverhandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/tmwa/charserverhandler.cpp') diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index af0d4ad42..d7b92be1a 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -65,7 +65,7 @@ void CharServerHandler::chooseCharacter(Net::Character *const character) mCharSelectDialog = nullptr; createOutPacket(CMSG_CHAR_SELECT); - outMsg.writeInt8(static_cast(mSelectedCharacter->slot), + outMsg.writeInt8(CAST_U8(mSelectedCharacter->slot), "slot"); } @@ -80,12 +80,12 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, createOutPacket(CMSG_CHAR_CREATE); outMsg.writeString(name, 24, "name"); for (int i = 0; i < 6; i++) - outMsg.writeInt8(static_cast(stats[i]), "stat"); + outMsg.writeInt8(CAST_U8(stats[i]), "stat"); - outMsg.writeInt8(static_cast(slot), "slot"); - outMsg.writeInt8(static_cast(hairColor), "hair color"); + outMsg.writeInt8(CAST_U8(slot), "slot"); + outMsg.writeInt8(CAST_S8(hairColor), "hair color"); outMsg.writeInt8(0, "unused"); - outMsg.writeInt8(static_cast(hairstyle), "hair style"); + outMsg.writeInt8(CAST_S8(hairstyle), "hair style"); outMsg.writeInt8(0, "unused"); } -- cgit v1.2.3-60-g2f50