diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-08 19:13:26 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-03-08 19:13:26 +0000 |
commit | 405c23831a4e1363f26f848215c8140f6d6d9f78 (patch) | |
tree | edf8b8838f055a1b5d024a3976b49f5cddfa8c50 /src/main.cpp | |
parent | e645ad2a139c332937813dd2a1e5424ded182e26 (diff) | |
download | mana-405c23831a4e1363f26f848215c8140f6d6d9f78.tar.gz mana-405c23831a4e1363f26f848215c8140f6d6d9f78.tar.bz2 mana-405c23831a4e1363f26f848215c8140f6d6d9f78.tar.xz mana-405c23831a4e1363f26f848215c8140f6d6d9f78.zip |
Added a 'dtor' helper functor to delete objects in arrays and containers using STL algorithms.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4013cbec..eba01d0f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -77,6 +77,8 @@ #include "resources/image.h" #include "resources/resourcemanager.h" +#include "utils/dtor.h" + // Account infos char n_server, n_character; @@ -319,11 +321,7 @@ void exit_engine() config.write(); delete gui; delete graphics; - //delete hairset; - for (unsigned int i = 0; i < hairset.size(); i++) - { - delete hairset[i]; - } + for_each(hairset.begin(), hairset.end(), make_dtor(hairset)); hairset.clear(); delete playerset; |