mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
Revert "AK: Remove virtual destructors from non-virtual classes"
This reverts commit 4378d36f67
.
This commit is contained in:
parent
bf9c04a3da
commit
f90c224fc5
2 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,7 @@ template<Integral K, typename V, IntrusiveRedBlackTreeNode<K> V::*member>
|
||||||
class IntrusiveRedBlackTree : public BaseRedBlackTree<K> {
|
class IntrusiveRedBlackTree : public BaseRedBlackTree<K> {
|
||||||
public:
|
public:
|
||||||
IntrusiveRedBlackTree() = default;
|
IntrusiveRedBlackTree() = default;
|
||||||
~IntrusiveRedBlackTree()
|
virtual ~IntrusiveRedBlackTree() override
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,10 +33,12 @@ public:
|
||||||
: key(key)
|
: key(key)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
virtual ~Node() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BaseRedBlackTree() = default; // These are protected to ensure no one instantiates the leaky base red black tree directly
|
BaseRedBlackTree() = default; // These are protected to ensure no one instantiates the leaky base red black tree directly
|
||||||
|
virtual ~BaseRedBlackTree() {};
|
||||||
|
|
||||||
void rotate_left(Node* subtree_root)
|
void rotate_left(Node* subtree_root)
|
||||||
{
|
{
|
||||||
|
@ -416,7 +418,7 @@ template<Integral K, typename V>
|
||||||
class RedBlackTree : public BaseRedBlackTree<K> {
|
class RedBlackTree : public BaseRedBlackTree<K> {
|
||||||
public:
|
public:
|
||||||
RedBlackTree() = default;
|
RedBlackTree() = default;
|
||||||
~RedBlackTree()
|
virtual ~RedBlackTree() override
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue