diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-08 21:13:38 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-08 21:22:43 +0100 |
commit | ddc93c461070fb3d868fbb5426e8361d1b93ee38 (patch) | |
tree | 250eacd391542d36a51c4d3aa398d4f6346619fb /src/being.cpp | |
parent | d129ce9776a6fd0e165b676a3addd14186c5d85d (diff) | |
download | mana-ddc93c461070fb3d868fbb5426e8361d1b93ee38.tar.gz mana-ddc93c461070fb3d868fbb5426e8361d1b93ee38.tar.bz2 mana-ddc93c461070fb3d868fbb5426e8361d1b93ee38.tar.xz mana-ddc93c461070fb3d868fbb5426e8361d1b93ee38.zip |
Introduced another template to make deleting all values in a container easier.
Inspired by qDeleteAll() from Qt.
Conflicts:
ChangeLog
src/beingmanager.cpp
src/channelmanager.cpp
src/gui/skill.cpp
src/map.cpp
src/resources/monsterinfo.cpp
(cherry picked from mainline)
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp index 5f7ad73f..e1c370c3 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -20,7 +20,6 @@ */ #include "being.h" -#include <algorithm> #include <cassert> #include "animatedsprite.h" @@ -96,7 +95,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(); setMap(NULL); |