void
SplayNode<V>::walk(SPLAYWALKEE * walkee, void *state)
{
- if (this == NULL)
- return;
-
if (left)
left->walk(walkee, state);
void
SplayNode<V>::destroy(SPLAYFREE * free_func)
{
- if (!this)
- return;
-
if (left)
left->destroy(free_func);
SplayNode<V> *
SplayNode<V>::remove(Value const dataToRemove, SPLAYCMP * compare)
{
- assert(this != NULL);
-
SplayNode<V> *result = splay(dataToRemove, compare);
if (splayLastResult == 0) { /* found it */
{
/* create node to insert */
SplayNode<V> *newNode = new SplayNode<V>(dataToInsert);
-
- assert(this != NULL);
-
SplayNode<V> *newTop = splay(dataToInsert, compare);
if (splayLastResult < 0) {
SplayNode<V> *
SplayNode<V>::splay(FindValue const &dataToFind, int( * compare)(FindValue const &a, Value const &b)) const
{
- assert(this != NULL);
-
Value temp = Value();
SplayNode<V> N(temp);
SplayNode<V> *l;