]> wimlib.net Git - wimlib/commitdiff
avl_tree: remove now-unused support for "unlinked" marker
authorEric Biggers <ebiggers3@gmail.com>
Tue, 26 Jul 2016 02:57:20 +0000 (19:57 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 26 Jul 2016 04:59:10 +0000 (21:59 -0700)
include/wimlib/avl_tree.h
src/avl_tree.c

index 2e07e03c5b7e3dff40663ce0eff81fbd774609ab..8f7559156f90a7008b8cb5f9ff7a0dbe8401afe2 100644 (file)
@@ -62,22 +62,6 @@ avl_get_parent(const struct avl_tree_node *node)
        return (struct avl_tree_node *)(node->parent_balance & ~3);
 }
 
-/* Marks the specified AVL tree node as unlinked from any tree.  */
-static forceinline void
-avl_tree_node_set_unlinked(struct avl_tree_node *node)
-{
-       node->parent_balance = (uintptr_t)node;
-}
-
-/* Returns true iff the specified AVL tree node has been marked with
- * avl_tree_node_set_unlinked() and has not subsequently been inserted into a
- * tree.  */
-static forceinline bool
-avl_tree_node_is_unlinked(const struct avl_tree_node *node)
-{
-       return node->parent_balance == (uintptr_t)node;
-}
-
 /* (Internal use only)  */
 extern void
 avl_tree_rebalance_after_insert(struct avl_tree_node **root_ptr,
index de95270ee99c56ff538af526875fbff32f8f168b..38a8ecc5b449b989a8648802ae46dcaba992097b 100644 (file)
@@ -725,8 +725,7 @@ avl_tree_swap_with_successor(struct avl_tree_node **root_ptr,
  *     remove from the tree.
  *
  * Note: This function *only* removes the node and rebalances the tree.
- * It does not free any memory, nor does it do the equivalent of
- * avl_tree_node_set_unlinked().
+ * It does not free any memory.
  */
 void
 avl_tree_remove(struct avl_tree_node **root_ptr, struct avl_tree_node *node)