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/eathena/buyingstorehandler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/net/eathena/buyingstorehandler.cpp') diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index a850a8785..5fcc9c4aa 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -48,15 +48,15 @@ void BuyingStoreHandler::create(const std::string &name, std::vector &items) const { createOutPacket(CMSG_BUYINGSTORE_CREATE); - outMsg.writeInt16(static_cast(89 + items.size() * 8), "len"); + outMsg.writeInt16(CAST_S16(89 + items.size() * 8), "len"); outMsg.writeInt32(maxMoney, "limit money"); outMsg.writeInt8(flag, "flag"); outMsg.writeString(name, 80, "store name"); FOR_EACH (std::vector::const_iterator, it, items) { const ShopItem *const item = *it; - outMsg.writeInt16(static_cast(item->getId()), "item id"); - outMsg.writeInt16(static_cast(item->getQuantity()), "amount"); + outMsg.writeInt16(CAST_S16(item->getId()), "item id"); + outMsg.writeInt16(CAST_S16(item->getQuantity()), "amount"); outMsg.writeInt32(item->getPrice(), "price"); } } @@ -87,11 +87,11 @@ void BuyingStoreHandler::sell(const Being *const being, outMsg.writeInt16(18, "len"); outMsg.writeBeingId(being->getId(), "account id"); outMsg.writeInt32(storeId, "store id"); - outMsg.writeInt16(static_cast( + outMsg.writeInt16(CAST_S16( item->getInvIndex() + INVENTORY_OFFSET), "index"); - outMsg.writeInt16(static_cast(item->getId()), "item id"); - outMsg.writeInt16(static_cast(amount), "amount"); + outMsg.writeInt16(CAST_S16(item->getId()), "item id"); + outMsg.writeInt16(CAST_S16(amount), "amount"); } } // namespace EAthena -- cgit v1.2.3-70-g09d2