util/rb-tree: Inline rb_tree_init

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25091>
This commit is contained in:
Ian Romanick 2023-08-30 14:01:00 -07:00 committed by Marge Bot
parent 0f917d93bf
commit 385f01c89b
2 changed files with 6 additions and 7 deletions

View file

@ -92,12 +92,6 @@ rb_node_maximum(struct rb_node *node)
return node;
}
void
rb_tree_init(struct rb_tree *T)
{
T->root = NULL;
}
/**
* Replace the subtree of T rooted at u with the subtree rooted at v
*

View file

@ -72,7 +72,12 @@ struct rb_tree {
};
/** Initialize a red-black tree */
void rb_tree_init(struct rb_tree *T);
static inline void
rb_tree_init(struct rb_tree *T)
{
T->root = NULL;
}
/** Returns true if the red-black tree is empty */
static inline bool