mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 19:09:47 +08:00
rbtree: Delete _RBTree_Is_first()
This commit is contained in:
@@ -224,7 +224,7 @@ RTEMS_INLINE_ROUTINE bool rtems_rbtree_is_min(
|
||||
const rtems_rbtree_node *the_node
|
||||
)
|
||||
{
|
||||
return _RBTree_Is_first( the_rbtree, the_node, RBT_LEFT );
|
||||
return rtems_rbtree_min( the_rbtree ) == the_node;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -238,7 +238,7 @@ RTEMS_INLINE_ROUTINE bool rtems_rbtree_is_max(
|
||||
const rtems_rbtree_node *the_node
|
||||
)
|
||||
{
|
||||
return _RBTree_Is_first( the_rbtree, the_node, RBT_RIGHT );
|
||||
return rtems_rbtree_max( the_rbtree ) == the_node;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -401,26 +401,6 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Is_empty(
|
||||
return (the_rbtree->root == NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Is this the first node on the RBTree.
|
||||
*
|
||||
* This function returns true if @a the_node is the first node on
|
||||
* @a the_rbtree and false otherwise. @a dir specifies whether first means
|
||||
* minimum (0) or maximum (1).
|
||||
*
|
||||
* @retval true @a the_node is the first node on @a the_rbtree.
|
||||
* @retval false @a the_node is not the first node on @a the_rbtree.
|
||||
*
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE bool _RBTree_Is_first(
|
||||
const RBTree_Control *the_rbtree,
|
||||
const RBTree_Node *the_node,
|
||||
RBTree_Direction dir
|
||||
)
|
||||
{
|
||||
return (the_node == _RBTree_First(the_rbtree, dir));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns true if this node is the root node of a red-black tree, and
|
||||
* false otherwise.
|
||||
|
||||
Reference in New Issue
Block a user