mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
Add empty virtual destructor for lru_node_t.
history_lru_node_t has implicit destructor defined. However, because it's being deleted as lru_node_t, it's not being actually called, as lru_node_t doesn't have a virtual destructor.
This commit is contained in:
parent
bbce0909fe
commit
5766c7c53a
3
lru.h
3
lru.h
|
@ -36,6 +36,9 @@ public:
|
|||
/** Constructor */
|
||||
lru_node_t(const wcstring &pkey) : prev(NULL), next(NULL), key(pkey) { }
|
||||
|
||||
/** Virtual destructor that does nothing for classes that inherit lru_node_t */
|
||||
virtual ~lru_node_t() {}
|
||||
|
||||
/** operator< for std::set */
|
||||
bool operator<(const lru_node_t &other) const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user