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/markethandler.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/markethandler.cpp')
-rw-r--r-- | src/net/eathena/markethandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index de0e31345..b055d574a 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -56,11 +56,11 @@ void MarketHandler::buyItem(const int itemId, cnt = 100; createOutPacket(CMSG_NPC_MARKET_BUY); - outMsg.writeInt16(static_cast<int16_t>(4 + 6 * cnt), "len"); + outMsg.writeInt16(CAST_S16(4 + 6 * cnt), "len"); for (int f = 0; f < cnt; f ++) { - outMsg.writeInt16(static_cast<int16_t>(itemId), "item id"); - outMsg.writeInt32(static_cast<int16_t>(amount2), "amount"); + outMsg.writeInt16(CAST_S16(itemId), "item id"); + outMsg.writeInt32(CAST_S16(amount2), "amount"); } } @@ -86,7 +86,7 @@ void MarketHandler::buyItems(std::vector<ShopItem*> &items) const return; createOutPacket(CMSG_NPC_MARKET_BUY); - outMsg.writeInt16(static_cast<int16_t>(4 + pairSize * cnt), "len"); + outMsg.writeInt16(CAST_S16(4 + pairSize * cnt), "len"); FOR_EACH (std::vector<ShopItem*>::iterator, it, items) { ShopItem *const item = *it; @@ -101,15 +101,15 @@ void MarketHandler::buyItems(std::vector<ShopItem*> &items) const { for (int f = 0; f < usedQuantity; f ++) { - outMsg.writeInt16(static_cast<int16_t>(item->getId()), + outMsg.writeInt16(CAST_S16(item->getId()), "item id"); - outMsg.writeInt32(static_cast<int16_t>(1), "amount"); + outMsg.writeInt32(CAST_S16(1), "amount"); } } else { - outMsg.writeInt16(static_cast<int16_t>(item->getId()), "item id"); - outMsg.writeInt32(static_cast<int16_t>(usedQuantity), "amount"); + outMsg.writeInt16(CAST_S16(item->getId()), "item id"); + outMsg.writeInt32(CAST_S16(usedQuantity), "amount"); } } } |