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/CommandParser.hh"
|
||||||
#include "FbTk/I18n.hh"
|
#include "FbTk/I18n.hh"
|
||||||
#include "FbTk/AutoReloadHelper.hh"
|
#include "FbTk/AutoReloadHelper.hh"
|
||||||
|
#include "FbTk/STLUtil.hh"
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
@ -102,6 +103,8 @@ using std::vector;
|
||||||
using std::ifstream;
|
using std::ifstream;
|
||||||
using std::pair;
|
using std::pair;
|
||||||
|
|
||||||
|
using FbTk::STLUtil::destroyAndClearSecond;
|
||||||
|
|
||||||
// helper class 'keytree'
|
// helper class 'keytree'
|
||||||
class Keys::t_key {
|
class Keys::t_key {
|
||||||
public:
|
public:
|
||||||
|
@ -185,9 +188,8 @@ Keys::~Keys() {
|
||||||
|
|
||||||
/// Destroys the keytree
|
/// Destroys the keytree
|
||||||
void Keys::deleteTree() {
|
void Keys::deleteTree() {
|
||||||
for (keyspace_t::iterator map_it = m_map.begin(); map_it != m_map.end(); ++map_it)
|
|
||||||
delete map_it->second;
|
destroyAndClearSecond(m_map);
|
||||||
m_map.clear();
|
|
||||||
next_key = 0;
|
next_key = 0;
|
||||||
saved_keymode = 0;
|
saved_keymode = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue