diff options
author | Steve Huston <shuston@riverace.com> | 1999-05-31 18:53:26 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 1999-05-31 18:53:26 +0000 |
commit | ce7720b935f7144d14511dad9e7857a2baa14990 (patch) | |
tree | dd8f2f8e9cb54cdbe14671a782af940a2c34a479 /ace | |
parent | 907b3899fb9c6da6e22c7c5e9e1d714f33d089a8 (diff) | |
download | ATCD-ce7720b935f7144d14511dad9e7857a2baa14990.tar.gz |
Replaced 1.12 version.
Diffstat (limited to 'ace')
-rw-r--r-- | ace/RB_Tree.i | 47 |
1 files changed, 11 insertions, 36 deletions
diff --git a/ace/RB_Tree.i b/ace/RB_Tree.i index 9ddc53d47f6..693848e1675 100644 --- a/ace/RB_Tree.i +++ b/ace/RB_Tree.i @@ -935,9 +935,7 @@ ACE_INLINE EXT_ID * ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key () { ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key"); - ACE_RB_Tree_Node <EXT_ID, INT_ID> *node_p = - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_; - return node_p ? (&(node_p->key ())) : 0; + return node_ ? (&(node_->key ())) : 0; } @@ -948,9 +946,7 @@ ACE_INLINE INT_ID * ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item () { ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item"); - ACE_RB_Tree_Node <EXT_ID, INT_ID> *node_p = - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_; - return node_p ? (&(node_p->item ())) : 0; + return node_ ? (&(node_->item ())) : 0; } @@ -961,13 +957,8 @@ ACE_INLINE int ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first () { ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first"); - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ = - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree_-> - RB_tree_minimum (ACE_RB_Tree_Iterator<EXT_ID, INT_ID, - COMPARE_KEYS, - ACE_LOCK>::tree_->root_); - return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ ? - 1 : 0; + node_ = tree_->RB_tree_minimum (tree_->root_); + return node_ ? 1 : 0; } @@ -978,13 +969,8 @@ ACE_INLINE int ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last () { ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last"); - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ = - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree_-> - RB_tree_maximum (ACE_RB_Tree_Iterator<EXT_ID, INT_ID, - COMPARE_KEYS, - ACE_LOCK>::tree_->root_); - return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ ? - 1 : 0; + node_ = tree_->RB_tree_maximum (tree_->root_); + return node_ ? 1 : 0; } @@ -996,13 +982,8 @@ ACE_INLINE int ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next () { ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next"); - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ = - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree_-> - RB_tree_successor (ACE_RB_Tree_Iterator<EXT_ID, INT_ID, - COMPARE_KEYS, - ACE_LOCK>::node_); - return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ ? - 1 : 0; + node_ = tree_->RB_tree_successor (node_); + return node_ ? 1 : 0; } @@ -1014,13 +995,8 @@ ACE_INLINE int ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous () { ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous"); - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ = - ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree_-> - RB_tree_predecessor (ACE_RB_Tree_Iterator<EXT_ID, INT_ID, - COMPARE_KEYS, - ACE_LOCK>::node_); - return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ ? - 1 : 0; + node_ = tree_->RB_tree_predecessor (node_); + return node_ ? 1 : 0; } @@ -1032,8 +1008,7 @@ ACE_INLINE int ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done () { ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done"); - return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::node_ ? - 0 : 1; + return node_ ? 0 : 1; } |