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/tmwa/charserverhandler.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/tmwa/charserverhandler.cpp')
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<unsigned char>(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<unsigned char>(stats[i]), "stat"); + outMsg.writeInt8(CAST_U8(stats[i]), "stat"); - outMsg.writeInt8(static_cast<unsigned char>(slot), "slot"); - outMsg.writeInt8(static_cast<int8_t>(hairColor), "hair color"); + outMsg.writeInt8(CAST_U8(slot), "slot"); + outMsg.writeInt8(CAST_S8(hairColor), "hair color"); outMsg.writeInt8(0, "unused"); - outMsg.writeInt8(static_cast<int8_t>(hairstyle), "hair style"); + outMsg.writeInt8(CAST_S8(hairstyle), "hair style"); outMsg.writeInt8(0, "unused"); } |