summaryrefslogtreecommitdiff
path: root/src/statuseffect.cpp
diff options
context:
space:
mode:
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();
}