black_count

Benjamin Kosnik bkoz@cygnus.com
Mon Jul 12 11:37:00 GMT 1999


Nathan's second patch is what went in. Thanks Nathan. . 

-Benjamin

-------------

inline int
__black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root)
{
  if (__node == 0)
    return 0;
  int __sum = 0;
  do {
    if (__node->_M_color == _S_rb_tree_black) ++__sum;
    if (__node == __root) break;
    __node = __node->_M_parent;
  } while (1);
  return __sum;
}

-Benjamin




More information about the Libstdc++ mailing list