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/gui/models/shopitems.cpp | |
parent | 16bcb81b0509725e4546bcb3c390ca3c1bb7e7b1 (diff) | |
download | mv-311c175f3184103950c72bc5c775174597430b83.tar.gz mv-311c175f3184103950c72bc5c775174597430b83.tar.bz2 mv-311c175f3184103950c72bc5c775174597430b83.tar.xz mv-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/gui/models/shopitems.cpp')
-rw-r--r-- | src/gui/models/shopitems.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/models/shopitems.cpp b/src/gui/models/shopitems.cpp index 763b75390..27e05ff12 100644 --- a/src/gui/models/shopitems.cpp +++ b/src/gui/models/shopitems.cpp @@ -133,10 +133,10 @@ ShopItem *ShopItems::at(const size_t i) const return mShopItems.at(i); } -bool ShopItems::findInAllItems(std::vector<ShopItem*>::iterator &it, +bool ShopItems::findInAllItems(STD_VECTOR<ShopItem*>::iterator &it, const ShopItem *const item) { - const std::vector<ShopItem*>::iterator it_end = mAllShopItems.end(); + const STD_VECTOR<ShopItem*>::iterator it_end = mAllShopItems.end(); for (it = mAllShopItems.begin(); it != it_end; ++ it) { if (*it == item) @@ -151,7 +151,7 @@ void ShopItems::erase(const unsigned int i) return; const ShopItem *const item = *(mShopItems.begin() + i); - std::vector<ShopItem*>::iterator it; + STD_VECTOR<ShopItem*>::iterator it; if (findInAllItems(it, item)) mAllShopItems.erase(it); mShopItems.erase(mShopItems.begin() + i); @@ -163,7 +163,7 @@ void ShopItems::del(const unsigned int i) return; ShopItem *item = *(mShopItems.begin() + i); - std::vector<ShopItem*>::iterator it; + STD_VECTOR<ShopItem*>::iterator it; if (findInAllItems(it, item)) mAllShopItems.erase(it); mShopItems.erase(mShopItems.begin() + i); @@ -180,8 +180,8 @@ void ShopItems::clear() ShopItem *ShopItems::findItem(const int id, const ItemColor color) const { - std::vector<ShopItem*>::const_iterator it = mShopItems.begin(); - const std::vector<ShopItem*>::const_iterator e = mShopItems.end(); + STD_VECTOR<ShopItem*>::const_iterator it = mShopItems.begin(); + const STD_VECTOR<ShopItem*>::const_iterator e = mShopItems.end(); while (it != e) { ShopItem *const item = *it; @@ -197,7 +197,7 @@ ShopItem *ShopItems::findItem(const int id, void ShopItems::updateList() { mShopItems.clear(); - FOR_EACH (std::vector<ShopItem*>::iterator, it, mAllShopItems) + FOR_EACH (STD_VECTOR<ShopItem*>::iterator, it, mAllShopItems) { ShopItem *const item = *it; if ((item != nullptr) && item->isVisible()) |