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/map.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/map.cpp')
-rw-r--r-- | src/map.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/map.cpp b/src/map.cpp index 928a0154..6e33d255 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -21,7 +21,6 @@ #include "map.h" -#include <algorithm> #include <queue> #include "beingmanager.h" @@ -153,9 +152,9 @@ Map::~Map() { // delete metadata, layers, tilesets and overlays delete[] mMetaTiles; - for_each(mLayers.begin(), mLayers.end(), make_dtor(mLayers)); - for_each(mTilesets.begin(), mTilesets.end(), make_dtor(mTilesets)); - for_each(mOverlays.begin(), mOverlays.end(), make_dtor(mOverlays)); + delete_all(mLayers); + delete_all(mTilesets); + delete_all(mOverlays); } void Map::initializeOverlays() |