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/flooritemmanager.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/flooritemmanager.cpp')
-rw-r--r-- | src/flooritemmanager.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/flooritemmanager.cpp b/src/flooritemmanager.cpp index 8a00cc51..c28755fb 100644 --- a/src/flooritemmanager.cpp +++ b/src/flooritemmanager.cpp @@ -21,8 +21,6 @@ * $Id$ */ -#include <algorithm> - #include "flooritemmanager.h" #include "floor_item.h" @@ -50,7 +48,7 @@ void FloorItemManager::destroy(FloorItem *item) void FloorItemManager::clear() { - for_each(mFloorItems.begin(), mFloorItems.end(), make_dtor(mFloorItems)); + delete_all(mFloorItems); mFloorItems.clear(); } |