mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00: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
1 changed files with 3 additions and 0 deletions
3
lru.h
3
lru.h
|
@ -36,6 +36,9 @@ public:
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
lru_node_t(const wcstring &pkey) : prev(NULL), next(NULL), key(pkey) { }
|
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 */
|
/** operator< for std::set */
|
||||||
bool operator<(const lru_node_t &other) const
|
bool operator<(const lru_node_t &other) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue