summaryrefslogtreecommitdiff
path: root/src/beingmanager.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-09-04 20:09:57 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-09-04 20:09:57 +0000
commitef36048760f80708ac1eaccbc2a21e7a700dc2ab (patch)
treeadf7bde9971d56e55cdf1bb88880ccecc0451e6f /src/beingmanager.cpp
parentfd3706906e3408b497c61dcc54294dee8e6dbaf7 (diff)
downloadmana-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/beingmanager.cpp')
-rw-r--r--src/beingmanager.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp
index 214a1995..a58c97e7 100644
--- a/src/beingmanager.cpp
+++ b/src/beingmanager.cpp
@@ -21,7 +21,6 @@
* $Id$
*/
-#include <algorithm>
#include <cassert>
#include "beingmanager.h"
@@ -148,7 +147,7 @@ void BeingManager::clear()
mBeings.remove(player_node);
}
- for_each(mBeings.begin(), mBeings.end(), make_dtor(mBeings));
+ delete_all(mBeings);
mBeings.clear();
if (player_node)