summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Semushin <php-coder@altlinux.ru>2009-03-03 11:55:04 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2009-03-04 20:45:52 (GMT)
commit5532aca9169728a459fedac1b18aae73dc9c1d37 (patch)
tree0ba529c4eb48281ec6421e05c6061a690128c183
parenta144008c1fe000c9a107ae1335e5741ff079e999 (diff)
downloadfluxbox_lack-5532aca9169728a459fedac1b18aae73dc9c1d37.zip
fluxbox_lack-5532aca9169728a459fedac1b18aae73dc9c1d37.tar.bz2
src/Keys.cc(deleteTree): use FbTk::STLUtil::destroyAndClearSecond() instead of self-written code.
No functional change. Signed-off-by: Slava Semushin <php-coder@altlinux.ru>
-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}