summaryrefslogtreecommitdiff
path: root/src/being.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/being.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/being.cpp')
-rw-r--r--src/being.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 2f7debfd..cf2e3772 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -22,7 +22,6 @@
*/
#include "being.h"
-#include <algorithm>
#include <cassert>
#include <cmath>
@@ -84,7 +83,7 @@ Being::Being(int id, int job, Map *map):
Being::~Being()
{
- std::for_each(mSprites.begin(), mSprites.end(), make_dtor(mSprites));
+ delete_all(mSprites);
clearPath();
for ( std::list<Particle *>::iterator i = mChildParticleEffects.begin();