From: Eric Biggers Date: Tue, 26 Jul 2016 02:57:20 +0000 (-0700) Subject: avl_tree: remove now-unused support for "unlinked" marker X-Git-Tag: v1.10.0~9 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=c68da43690263dd818fc974cfe96364f8c8d945e avl_tree: remove now-unused support for "unlinked" marker --- diff --git a/include/wimlib/avl_tree.h b/include/wimlib/avl_tree.h index 2e07e03c..8f755915 100644 --- a/include/wimlib/avl_tree.h +++ b/include/wimlib/avl_tree.h @@ -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, diff --git a/src/avl_tree.c b/src/avl_tree.c index de95270e..38a8ecc5 100644 --- a/src/avl_tree.c +++ b/src/avl_tree.c @@ -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)