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/vendinghandler.cpp | |
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/vendinghandler.cpp')
-rw-r--r-- | src/net/eathena/vendinghandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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( |