diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-08-05 00:37:08 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-08-05 00:37:08 +0000 |
commit | cc3f25d98b8f7a06c823188ae45ced612e9bd09d (patch) | |
tree | 864c68fb171358f73b307b87c464ceab7bd51a4f /src/being.cpp | |
parent | 20768da80e4475531b3487c51c900265c9cc333e (diff) | |
download | mana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.tar.gz mana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.tar.bz2 mana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.tar.xz mana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.zip |
Forgot to commit the ChangeLog as well...
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/being.cpp b/src/being.cpp index 4d106641..a688aec5 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -22,6 +22,8 @@ */ #include "being.h" +#include <algorithm> + #include "animatedsprite.h" #include "equipment.h" #include "game.h" @@ -33,6 +35,7 @@ #include "gui/gui.h" +#include "utils/dtor.h" #include "utils/tostring.h" extern Spriteset *emotionset; @@ -66,14 +69,7 @@ Being::Being(Uint32 id, Uint16 job, Map *map): Being::~Being() { - for (int i = 0; i < VECTOREND_SPRITE; i++) - { - if (mSprites[i] != NULL) - { - delete mSprites[i]; - } - } - + std::for_each(mSprites.begin(), mSprites.end(), make_dtor(mSprites)); clearPath(); setMap(NULL); } |