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/charserverhandler.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | plus-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/charserverhandler.cpp')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 37e2e72ea..ce84840ca 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -66,7 +66,7 @@ void CharServerHandler::chooseCharacter(Net::Character *const character) mCharSelectDialog = nullptr; createOutPacket(CMSG_CHAR_SELECT); - outMsg.writeInt8(static_cast<unsigned char>( + outMsg.writeInt8(CAST_U8( mSelectedCharacter->slot), "slot"); } @@ -81,11 +81,11 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, createOutPacket(CMSG_CHAR_CREATE); outMsg.writeString(name, 24, "login"); - outMsg.writeInt8(static_cast<unsigned char>(slot), "slot"); - outMsg.writeInt16(static_cast<int16_t>(hairColor), "hair color"); - outMsg.writeInt16(static_cast<int16_t>(hairstyle), "hair style"); + outMsg.writeInt8(CAST_U8(slot), "slot"); + outMsg.writeInt16(CAST_S16(hairColor), "hair color"); + outMsg.writeInt16(CAST_S16(hairstyle), "hair style"); if (serverFeatures->haveRaceSelection()) - outMsg.writeInt16(static_cast<int16_t>(race), "race"); + outMsg.writeInt16(CAST_S16(race), "race"); if (serverFeatures->haveCreateCharGender()) { uint8_t sex = 0; @@ -96,7 +96,7 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, outMsg.writeInt8(sex, "gender"); } if (serverFeatures->haveLookSelection()) - outMsg.writeInt16(static_cast<int16_t>(look), "look"); + outMsg.writeInt16(CAST_S16(look), "look"); } void CharServerHandler::deleteCharacter(Net::Character *const character, @@ -180,8 +180,8 @@ void CharServerHandler::renameCharacter(const BeingId id, void CharServerHandler::changeSlot(const int oldSlot, const int newSlot) { createOutPacket(CMSG_CHAR_CHANGE_SLOT); - outMsg.writeInt16(static_cast<int16_t>(oldSlot), "old slot"); - outMsg.writeInt16(static_cast<int16_t>(newSlot), "new slot"); + outMsg.writeInt16(CAST_S16(oldSlot), "old slot"); + outMsg.writeInt16(CAST_S16(newSlot), "new slot"); outMsg.writeInt16(0, "unused"); } |