diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-14 01:31:22 +0300 |
commit | 311c175f3184103950c72bc5c775174597430b83 (patch) | |
tree | ad022dc44a1c4177b3d53bf0d7eaa5a1736c8cf1 /src/net/eathena | |
parent | 16bcb81b0509725e4546bcb3c390ca3c1bb7e7b1 (diff) | |
download | plus-311c175f3184103950c72bc5c775174597430b83.tar.gz plus-311c175f3184103950c72bc5c775174597430b83.tar.bz2 plus-311c175f3184103950c72bc5c775174597430b83.tar.xz plus-311c175f3184103950c72bc5c775174597430b83.zip |
Replace std::vector into macro STD_VECTOR.
In most case it equal to std::vector except debug modes.
Now it can be also mse::mstd::vector, but sadly this class not support
all required features.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/buyingstorehandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/buyingstorehandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/cashshophandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/cashshophandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/markethandler.cpp | 6 | ||||
-rw-r--r-- | src/net/eathena/markethandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/npchandler.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/npchandler.h | 4 | ||||
-rw-r--r-- | src/net/eathena/playerrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 10 | ||||
-rw-r--r-- | src/net/eathena/vendinghandler.h | 4 |
15 files changed, 32 insertions, 32 deletions
diff --git a/src/net/eathena/buyingstorehandler.cpp b/src/net/eathena/buyingstorehandler.cpp index d342be0b8..ae2157452 100644 --- a/src/net/eathena/buyingstorehandler.cpp +++ b/src/net/eathena/buyingstorehandler.cpp @@ -47,7 +47,7 @@ BuyingStoreHandler::BuyingStoreHandler() void BuyingStoreHandler::create(const std::string &name, const int maxMoney, const bool flag, - const std::vector<ShopItem*> &items) const + const STD_VECTOR<ShopItem*> &items) const { if (packetVersion < 20100303) return; @@ -56,7 +56,7 @@ void BuyingStoreHandler::create(const std::string &name, outMsg.writeInt32(maxMoney, "limit money"); outMsg.writeInt8(static_cast<int8_t>(flag), "flag"); outMsg.writeString(name, 80, "store name"); - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { const ShopItem *const item = *it; outMsg.writeInt16(CAST_S16(item->getId()), "item id"); diff --git a/src/net/eathena/buyingstorehandler.h b/src/net/eathena/buyingstorehandler.h index ae060095f..61b412bd6 100644 --- a/src/net/eathena/buyingstorehandler.h +++ b/src/net/eathena/buyingstorehandler.h @@ -35,7 +35,7 @@ class BuyingStoreHandler final : public Net::BuyingStoreHandler void create(const std::string &name, const int maxMoney, const bool flag, - const std::vector<ShopItem*> &items) const override final; + const STD_VECTOR<ShopItem*> &items) const override final; void close() const override final; diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index 105a45141..c693cb1f0 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -58,7 +58,7 @@ void CashShopHandler::buyItem(const int points, } void CashShopHandler::buyItems(const int points, - const std::vector<ShopItem*> &items) const + const STD_VECTOR<ShopItem*> &items) const { if (packetVersion < 20101124) return; @@ -66,7 +66,7 @@ void CashShopHandler::buyItems(const int points, int cnt = 0; const int pairSize = 4; - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { const ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); @@ -93,7 +93,7 @@ void CashShopHandler::buyItems(const int points, outMsg.writeInt16(CAST_S16(10 + pairSize * cnt), "len"); outMsg.writeInt32(points, "points"); outMsg.writeInt16(CAST_S16(cnt), "count"); - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); diff --git a/src/net/eathena/cashshophandler.h b/src/net/eathena/cashshophandler.h index 5fe2a6517..8adfec064 100644 --- a/src/net/eathena/cashshophandler.h +++ b/src/net/eathena/cashshophandler.h @@ -38,7 +38,7 @@ class CashShopHandler final : public Net::CashShopHandler const int amount) const override final; void buyItems(const int points, - const std::vector<ShopItem*> &items) const override final + const STD_VECTOR<ShopItem*> &items) const override final A_CONST; void close() const override final; diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index a184abd07..f9cd6729d 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -76,7 +76,7 @@ void CharServerHandler::newCharacter(const std::string &name, const int slot, const int hairstyle, const int hairColor, const unsigned char race, const uint16_t look, - const std::vector<int> &stats A_UNUSED) + const STD_VECTOR<int> &stats A_UNUSED) const { createOutPacket(CMSG_CHAR_CREATE); diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index 342dcae59..20b467120 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -48,7 +48,7 @@ class CharServerHandler final : public Ea::CharServerHandler const int hairColor, const unsigned char race, const uint16_t look, - const std::vector<int> &stats) const override final; + const STD_VECTOR<int> &stats) const override final; void renameCharacter(const BeingId id, const std::string &newName) const override final; diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 74b0777e0..ed9296a8b 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -558,13 +558,13 @@ void InventoryHandler::identifyItem(const Item *const item) const "item index"); } -void InventoryHandler::mergeItemsAck(const std::vector<Item*> &items) const +void InventoryHandler::mergeItemsAck(const STD_VECTOR<Item*> &items) const { createOutPacket(CMSG_MERGE_ITEM_ACK); const size_t sz = items.size(); outMsg.writeInt16(CAST_S16(sz * 2 + 4), "len"); - FOR_EACH (std::vector<Item*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<Item*>::const_iterator, it, items) { outMsg.writeInt16(CAST_S16((*it)->getInvIndex() + 2), "item index"); diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index c954b0ef8..3a804fb3d 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -74,7 +74,7 @@ class InventoryHandler final : public Ea::InventoryHandler void identifyItem(const Item *const item) const override final; - void mergeItemsAck(const std::vector<Item*> &items) const + void mergeItemsAck(const STD_VECTOR<Item*> &items) const override final; void mergetItemsCancel() const override final; diff --git a/src/net/eathena/markethandler.cpp b/src/net/eathena/markethandler.cpp index bcba57e81..98b8b5d9f 100644 --- a/src/net/eathena/markethandler.cpp +++ b/src/net/eathena/markethandler.cpp @@ -75,14 +75,14 @@ void MarketHandler::buyItem(const int itemId, } } -void MarketHandler::buyItems(const std::vector<ShopItem*> &items) const +void MarketHandler::buyItems(const STD_VECTOR<ShopItem*> &items) const { if (packetVersion < 20131218) return; int cnt = 0; const int pairSize = 6; - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { const ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); @@ -107,7 +107,7 @@ void MarketHandler::buyItems(const std::vector<ShopItem*> &items) const createOutPacket(CMSG_NPC_MARKET_BUY); outMsg.writeInt16(CAST_S16(4 + pairSize * cnt), "len"); - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); diff --git a/src/net/eathena/markethandler.h b/src/net/eathena/markethandler.h index f68eb596d..8fe2c4bfb 100644 --- a/src/net/eathena/markethandler.h +++ b/src/net/eathena/markethandler.h @@ -40,7 +40,7 @@ class MarketHandler final : public Net::MarketHandler const ItemColor color, const int amount) const override final; - void buyItems(const std::vector<ShopItem*> &items) const + void buyItems(const STD_VECTOR<ShopItem*> &items) const override final; }; diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp index 4e8d179f0..65e05e866 100644 --- a/src/net/eathena/npchandler.cpp +++ b/src/net/eathena/npchandler.cpp @@ -160,12 +160,12 @@ void NpcHandler::buyItem(const BeingId beingId A_UNUSED, outMsg.writeInt16(CAST_S16(itemId), "item id"); } -void NpcHandler::buyItems(std::vector<ShopItem*> &items) const +void NpcHandler::buyItems(STD_VECTOR<ShopItem*> &items) const { int cnt = 0; const int pairSize = 4; - FOR_EACH (std::vector<ShopItem*>::iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); @@ -190,7 +190,7 @@ void NpcHandler::buyItems(std::vector<ShopItem*> &items) const createOutPacket(CMSG_NPC_BUY_REQUEST); outMsg.writeInt16(CAST_S16(4 + pairSize * cnt), "len"); - FOR_EACH (std::vector<ShopItem*>::iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); @@ -229,12 +229,12 @@ void NpcHandler::sellItem(const BeingId beingId A_UNUSED, outMsg.writeInt16(CAST_S16(amount), "amount"); } -void NpcHandler::sellItems(std::vector<ShopItem*> &items) const +void NpcHandler::sellItems(STD_VECTOR<ShopItem*> &items) const { const int pairSize = 4; int cnt = 0; - FOR_EACH (std::vector<ShopItem*>::iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); @@ -245,7 +245,7 @@ void NpcHandler::sellItems(std::vector<ShopItem*> &items) const createOutPacket(CMSG_NPC_SELL_REQUEST); outMsg.writeInt16(CAST_S16(4 + pairSize * cnt), "len"); - FOR_EACH (std::vector<ShopItem*>::iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h index a2962eea0..f1f259718 100644 --- a/src/net/eathena/npchandler.h +++ b/src/net/eathena/npchandler.h @@ -61,14 +61,14 @@ class NpcHandler final : public Ea::NpcHandler const ItemColor color, const int amount) const override final; - void buyItems(std::vector<ShopItem*> &items) const + void buyItems(STD_VECTOR<ShopItem*> &items) const override final; void sellItem(const BeingId beingId, const int itemId, const int amount) const override final; - void sellItems(std::vector<ShopItem*> &items) const override final; + void sellItems(STD_VECTOR<ShopItem*> &items) const override final; void completeProgressBar() const override final; diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp index c575e2615..a630bf9b7 100644 --- a/src/net/eathena/playerrecv.cpp +++ b/src/net/eathena/playerrecv.cpp @@ -395,7 +395,7 @@ void PlayerRecv::processOnlineList(Net::MessageIn &msg) BLOCK_START("PlayerRecv::processOnlineList") const int size = msg.readInt16("len") - 4; - std::vector<OnlinePlayer*> arr; + STD_VECTOR<OnlinePlayer*> arr; if (size == 0) { diff --git a/src/net/eathena/vendinghandler.cpp b/src/net/eathena/vendinghandler.cpp index 728e8fb7e..c5791cfd5 100644 --- a/src/net/eathena/vendinghandler.cpp +++ b/src/net/eathena/vendinghandler.cpp @@ -74,12 +74,12 @@ void VendingHandler::buy(const Being *const being, } void VendingHandler::buyItems(const Being *const being, - const std::vector<ShopItem*> &items) const + const STD_VECTOR<ShopItem*> &items) const { int cnt = 0; const int pairSize = 4; - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); @@ -94,7 +94,7 @@ void VendingHandler::buyItems(const Being *const being, createOutPacket(CMSG_VENDING_BUY); outMsg.writeInt16(CAST_S16(4 + 4 + pairSize * cnt), "len"); outMsg.writeBeingId(being->getId(), "account id"); - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { ShopItem *const item = *it; const int usedQuantity = item->getUsedQuantity(); @@ -126,13 +126,13 @@ void VendingHandler::buy2(const Being *const being, void VendingHandler::createShop(const std::string &name, const bool flag, - const std::vector<ShopItem*> &items) const + const STD_VECTOR<ShopItem*> &items) const { createOutPacket(CMSG_VENDING_CREATE_SHOP); outMsg.writeInt16(CAST_S16(85 + items.size() * 8), "len"); outMsg.writeString(name, 80, "shop name"); outMsg.writeInt8(CAST_S8(flag ? 1 : 0), "flag"); - FOR_EACH (std::vector<ShopItem*>::const_iterator, it, items) + FOR_EACH (STD_VECTOR<ShopItem*>::const_iterator, it, items) { const ShopItem *const item = *it; outMsg.writeInt16(CAST_S16( diff --git a/src/net/eathena/vendinghandler.h b/src/net/eathena/vendinghandler.h index e8beae27d..d8d3948f6 100644 --- a/src/net/eathena/vendinghandler.h +++ b/src/net/eathena/vendinghandler.h @@ -46,12 +46,12 @@ class VendingHandler final : public Net::VendingHandler const int amount) const override final; void buyItems(const Being *const being, - const std::vector<ShopItem*> &items) const + const STD_VECTOR<ShopItem*> &items) const override final; void createShop(const std::string &name, const bool flag, - const std::vector<ShopItem*> &items) const + const STD_VECTOR<ShopItem*> &items) const override final; }; |