util/rb-tree: Inline rb_tree_init
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 30 Aug 2023 21:01:00 +0000 (14:01 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 14 Sep 2023 22:31:22 +0000 (22:31 +0000)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25091>

src/util/rb_tree.c
src/util/rb_tree.h

index 5696577..a3bdd1b 100644 (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
  *
index 9d78987..5e00977 100644 (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