summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-08-05 00:37:08 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-08-05 00:37:08 +0000
commitcc3f25d98b8f7a06c823188ae45ced612e9bd09d (patch)
tree864c68fb171358f73b307b87c464ceab7bd51a4f
parent20768da80e4475531b3487c51c900265c9cc333e (diff)
downloadmana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.tar.gz
mana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.tar.bz2
mana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.tar.xz
mana-cc3f25d98b8f7a06c823188ae45ced612e9bd09d.zip
Forgot to commit the ChangeLog as well...
-rw-r--r--ChangeLog1
-rw-r--r--src/being.cpp12
2 files changed, 5 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ff57a9c..46ab58e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2006-08-04 Björn Steinbrink <B.Steinbrink@gmx
+ * src/animatedsprite.cpp: Fix enum being treated as string.
* src/animation.cpp: Small code cleanups. Removed unused headers.
* src/animatedsprite.cpp: Small code cleanup/lower indentation.
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);
}