summaryrefslogtreecommitdiff
path: root/src/net/eathena/partyhandler.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/partyhandler.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/partyhandler.cpp')
-rw-r--r--src/net/eathena/partyhandler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index d41b7914d..3aa26b1b5 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -83,7 +83,7 @@ void PartyHandler::inviteResponse(const int partyId,
{
createOutPacket(CMSG_PARTY_INVITED2);
outMsg.writeInt32(partyId, "party id");
- outMsg.writeInt8(static_cast<int8_t>(accept ? 1 : 0), "accept");
+ outMsg.writeInt8(CAST_S8(accept ? 1 : 0), "accept");
}
}
@@ -125,8 +125,8 @@ void PartyHandler::chat(const std::string &text) const
const std::string mes = std::string(localPlayer->getName()).append(
" : ").append(text);
- outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1), "len");
- outMsg.writeString(mes, static_cast<int>(mes.length()), "nick : message");
+ outMsg.writeInt16(CAST_S16(mes.length() + 4 + 1), "len");
+ outMsg.writeString(mes, CAST_S32(mes.length()), "nick : message");
outMsg.writeInt8(0, "null char");
}
@@ -137,8 +137,8 @@ void PartyHandler::setShareExperience(const PartyShareT share) const
return;
createOutPacket(CMSG_PARTY_SETTINGS);
- outMsg.writeInt16(static_cast<int16_t>(share), "share exp");
- outMsg.writeInt16(static_cast<int16_t>(Ea::PartyRecv::mShareItems),
+ outMsg.writeInt16(CAST_S16(share), "share exp");
+ outMsg.writeInt16(CAST_S16(Ea::PartyRecv::mShareItems),
"share items");
}
@@ -149,9 +149,9 @@ void PartyHandler::setShareItems(const PartyShareT share) const
return;
createOutPacket(CMSG_PARTY_SETTINGS);
- outMsg.writeInt16(static_cast<int16_t>(Ea::PartyRecv::mShareExp),
+ outMsg.writeInt16(CAST_S16(Ea::PartyRecv::mShareExp),
"share exp");
- outMsg.writeInt16(static_cast<int16_t>(share), "share items");
+ outMsg.writeInt16(CAST_S16(share), "share items");
}
void PartyHandler::changeLeader(const std::string &name) const
@@ -167,7 +167,7 @@ void PartyHandler::changeLeader(const std::string &name) const
void PartyHandler::allowInvite(const bool allow) const
{
createOutPacket(CMSG_PARTY_ALLOW_INVITES);
- outMsg.writeInt8(static_cast<int8_t>(allow ? 1 : 0), "allow");
+ outMsg.writeInt8(CAST_S8(allow ? 1 : 0), "allow");
}
} // namespace EAthena