mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
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:
parent
0f917d93bf
commit
385f01c89b
2 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue