util/IntrusiveTreeSet: add debug method Check()
Only for the unit test.
This commit is contained in:
committed by
Max Kellermann
parent
669cbcd25a
commit
e0a53d4747
@@ -176,6 +176,16 @@ public:
|
||||
[[nodiscard]]
|
||||
IntrusiveTreeSet() noexcept = default;
|
||||
|
||||
#ifndef NDEBUG
|
||||
/**
|
||||
* For debugging only: check the integrity of the red-black
|
||||
* tree.
|
||||
*/
|
||||
void Check() noexcept {
|
||||
RedBlackTreeNode::BlackHeight(GetRoot());
|
||||
}
|
||||
#endif
|
||||
|
||||
[[nodiscard]]
|
||||
constexpr bool empty() const noexcept {
|
||||
return GetRoot() == nullptr;
|
||||
|
||||
Reference in New Issue
Block a user