summaryrefslogtreecommitdiff
path: root/src/statuseffect.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-23 02:46:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-23 02:48:43 +0300
commita69a87c5a81ddbf25a25c5549259da550d207bda (patch)
tree59f1a919b327912395ab84bab1684118bf0379be /src/statuseffect.cpp
parente646f2fae3f323b7faa26aa9540524d1765211ee (diff)
downloadmanaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz
manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.zip
Improve a bit iterators again.
Diffstat (limited to 'src/statuseffect.cpp')
-rw-r--r--src/statuseffect.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index a7e06a2f4..e8d4b6b5d 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -191,10 +191,11 @@ void StatusEffect::load()
void unloadMap(std::map<int, StatusEffect *> &map)
{
- std::map<int, StatusEffect *>::iterator it;
-
- for (it = map.begin(); it != map.end(); ++it)
+ for (std::map<int, StatusEffect *>::iterator it = map.begin();
+ it != map.end(); ++it)
+ {
delete (*it).second;
+ }
map.clear();
}