From cc3f25d98b8f7a06c823188ae45ced612e9bd09d Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Sat, 5 Aug 2006 00:37:08 +0000 Subject: Forgot to commit the ChangeLog as well... --- src/being.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/being.cpp') 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 + #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); } -- cgit v1.2.3-60-g2f50