diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-09-04 20:09:57 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-09-04 20:09:57 +0000 |
commit | ef36048760f80708ac1eaccbc2a21e7a700dc2ab (patch) | |
tree | adf7bde9971d56e55cdf1bb88880ccecc0451e6f /src/gui/shop.cpp | |
parent | fd3706906e3408b497c61dcc54294dee8e6dbaf7 (diff) | |
download | mana-ef36048760f80708ac1eaccbc2a21e7a700dc2ab.tar.gz mana-ef36048760f80708ac1eaccbc2a21e7a700dc2ab.tar.bz2 mana-ef36048760f80708ac1eaccbc2a21e7a700dc2ab.tar.xz mana-ef36048760f80708ac1eaccbc2a21e7a700dc2ab.zip |
Introduced another template to make deleting all values in a container easier.
Inspired by qDeleteAll() from Qt.
Diffstat (limited to 'src/gui/shop.cpp')
-rw-r--r-- | src/gui/shop.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index effe8858..c5e257da 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -25,8 +25,6 @@ #include "../utils/dtor.h" -#include <algorithm> - ShopItems::~ShopItems() { clear(); @@ -59,7 +57,7 @@ ShopItem* ShopItems::at(int i) void ShopItems::clear() { - std::for_each(mShopItems.begin(), mShopItems.end(), make_dtor(mShopItems)); + delete_all(mShopItems); mShopItems.clear(); } |