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>
This commit is contained in:
parent
a144008c1f
commit
5532aca916
1 changed files with 5 additions and 3 deletions
|
@ -35,6 +35,7 @@
|
|||
#include "FbTk/CommandParser.hh"
|
||||
#include "FbTk/I18n.hh"
|
||||
#include "FbTk/AutoReloadHelper.hh"
|
||||
#include "FbTk/STLUtil.hh"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
@ -102,6 +103,8 @@ using std::vector;
|
|||
using std::ifstream;
|
||||
using std::pair;
|
||||
|
||||
using FbTk::STLUtil::destroyAndClearSecond;
|
||||
|
||||
// helper class 'keytree'
|
||||
class Keys::t_key {
|
||||
public:
|
||||
|
@ -185,9 +188,8 @@ Keys::~Keys() {
|
|||
|
||||
/// 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue