some more stuff for the avl tree

This commit is contained in:
madmaurice 2018-07-23 13:13:32 +02:00
parent 381bcd1de9
commit 77c444139b

View file

@ -426,6 +426,10 @@ public:
return node; return node;
} }
inline
bool in_tree(Node* node)
{ return (node->tree == this); }
#ifdef DUMP #ifdef DUMP
void dump() void dump()
{ {
@ -452,9 +456,13 @@ public:
{ Base::remove(static_cast<typename Base::Node*>(node)); } { Base::remove(static_cast<typename Base::Node*>(node)); }
inline inline
T* find(Key_type key) T* lookup(Key_type key)
{ return static_cast<T*>(Base::lookup(key)); } { return static_cast<T*>(Base::lookup(key)); }
inline
bool in_tree(T* node)
{ return Base::in_tree(static_cast<Base::Node*>(node)); }
#ifdef DUMP #ifdef DUMP
inline inline
void dump() void dump()