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/resources/itemdb.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/resources/itemdb.cpp')
-rw-r--r-- | src/resources/itemdb.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index ada9482f..202f4ba7 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -21,7 +21,6 @@ * $Id$ */ -#include <algorithm> #include <cassert> #include <libxml/tree.h> @@ -196,7 +195,7 @@ void ItemDB::unload() delete mUnknown; mUnknown = NULL; - for_each(mItemInfos.begin(), mItemInfos.end(), make_dtor(mItemInfos)); + delete_all(mItemInfos); mItemInfos.clear(); mLoaded = false; } |