diff options
author | Slava Semushin <php-coder@altlinux.ru> | 2009-03-03 11:55:04 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2009-03-04 20:45:52 (GMT) |
commit | 5532aca9169728a459fedac1b18aae73dc9c1d37 (patch) | |
tree | 0ba529c4eb48281ec6421e05c6061a690128c183 /src | |
parent | a144008c1fe000c9a107ae1335e5741ff079e999 (diff) | |
download | fluxbox_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>
Diffstat (limited to 'src')
-rw-r--r-- | src/Keys.cc | 8 |
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; | |||
102 | using std::ifstream; | 103 | using std::ifstream; |
103 | using std::pair; | 104 | using std::pair; |
104 | 105 | ||
106 | using FbTk::STLUtil::destroyAndClearSecond; | ||
107 | |||
105 | // helper class 'keytree' | 108 | // helper class 'keytree' |
106 | class Keys::t_key { | 109 | class Keys::t_key { |
107 | public: | 110 | public: |
@@ -185,9 +188,8 @@ Keys::~Keys() { | |||
185 | 188 | ||
186 | /// Destroys the keytree | 189 | /// Destroys the keytree |
187 | void Keys::deleteTree() { | 190 | void 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 | } |