all repos — fluxbox @ 5532aca9169728a459fedac1b18aae73dc9c1d37

custom fork of the fluxbox windowmanager

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>
Slava Semushin php-coder@altlinux.ru
commit

5532aca9169728a459fedac1b18aae73dc9c1d37

parent

a144008c1fe000c9a107ae1335e5741ff079e999

1 files changed, 5 insertions(+), 3 deletions(-)

jump to
M src/Keys.ccsrc/Keys.cc

@@ -35,6 +35,7 @@ #include "FbTk/KeyUtil.hh"

#include "FbTk/CommandParser.hh" #include "FbTk/I18n.hh" #include "FbTk/AutoReloadHelper.hh" +#include "FbTk/STLUtil.hh" #ifdef HAVE_CONFIG_H #include "config.h"

@@ -101,6 +102,8 @@ using std::string;

using std::vector; using std::ifstream; using std::pair; + +using FbTk::STLUtil::destroyAndClearSecond; // helper class 'keytree' class Keys::t_key {

@@ -185,9 +188,8 @@ }

/// Destroys the keytree void Keys::deleteTree() { - for (keyspace_t::iterator map_it = m_map.begin(); map_it != m_map.end(); ++map_it) - delete map_it->second; - m_map.clear(); + + destroyAndClearSecond(m_map); next_key = 0; saved_keymode = 0; }