summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Keys.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index ac25588..794aad4 100644
--- a/src/Keys.cc
+++ b/src/Keys.cc
@@ -35,6 +35,7 @@
35#include "FbTk/CommandParser.hh" 35#include "FbTk/CommandParser.hh"
36#include "FbTk/I18n.hh" 36#include "FbTk/I18n.hh"
37#include "FbTk/AutoReloadHelper.hh" 37#include "FbTk/AutoReloadHelper.hh"
38#include "FbTk/STLUtil.hh"
38 39
39#ifdef HAVE_CONFIG_H 40#ifdef HAVE_CONFIG_H
40#include "config.h" 41#include "config.h"
@@ -102,6 +103,8 @@ using std::vector;
102using std::ifstream; 103using std::ifstream;
103using std::pair; 104using std::pair;
104 105
106using FbTk::STLUtil::destroyAndClearSecond;
107
105// helper class 'keytree' 108// helper class 'keytree'
106class Keys::t_key { 109class Keys::t_key {
107public: 110public:
@@ -185,9 +188,8 @@ Keys::~Keys() {
185 188
186/// Destroys the keytree 189/// Destroys the keytree
187void Keys::deleteTree() { 190void Keys::deleteTree() {
188 for (keyspace_t::iterator map_it = m_map.begin(); map_it != m_map.end(); ++map_it) 191
189 delete map_it->second; 192 destroyAndClearSecond(m_map);
190 m_map.clear();
191 next_key = 0; 193 next_key = 0;
192 saved_keymode = 0; 194 saved_keymode = 0;
193} 195}