summaryrefslogtreecommitdiff
path: root/src/gui/skill.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skill.cpp')
-rw-r--r--src/gui/skill.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index ba117b67..f86d2356 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -30,8 +30,10 @@
#include "scrollarea.h"
#include "../localplayer.h"
-
#include "../graphics.h"
+
+#include "../utils/dtor.h"
+
extern Graphics *graphics;
const char *skill_db[] = {
@@ -193,9 +195,6 @@ void SkillDialog::setSkill(int id, int lvl, int mp)
void SkillDialog::cleanList()
{
- for (int i = skillList.size() - 1; i >= 0; i--)
- {
- delete skillList[i];
- }
+ for_each(skillList.begin(), skillList.end(), make_dtor(skillList));
skillList.clear();
}