summaryrefslogtreecommitdiff
path: root/ace/RB_Tree.cpp
diff options
context:
space:
mode:
authorcdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-08 13:52:28 +0000
committercdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-08 13:52:28 +0000
commitd1608f686cd53f4f6d133b2e66394b52e8ffc72e (patch)
tree67cbaf10e22dfcf144f071cc660c0e10e9d64cd1 /ace/RB_Tree.cpp
parent6534dd54c9c46ea8dbed35a496fece2625a61f31 (diff)
downloadATCD-d1608f686cd53f4f6d133b2e66394b52e8ffc72e.tar.gz
fixed template instantiations, compiler errors and warnings in uninstantiated code that g++ was checking
Diffstat (limited to 'ace/RB_Tree.cpp')
-rw-r--r--ace/RB_Tree.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/ace/RB_Tree.cpp b/ace/RB_Tree.cpp
index 881fe79ab5d..01987a70b3b 100644
--- a/ace/RB_Tree.cpp
+++ b/ace/RB_Tree.cpp
@@ -62,7 +62,7 @@ ACE_RB_Tree_Node<EXT_ID, INT_ID>::~ACE_RB_Tree_Node ()
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree (ACE_Allocator *alloc)
: allocator_ (alloc),
- root_ (0),
+ root_ (0),
current_size_ (0)
{
ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
@@ -76,13 +76,13 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree (ACE_Allocator
template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt)
- : allocator_ (rbt.allocator_),
+ : allocator_ (rbt.allocator_),
root_ (0),
current_size_ (0)
{
ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::"
"ACE_RB_Tree (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt)");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
+ ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
// Make a deep copy of the passed tree.
ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> iter(rbt);
@@ -111,7 +111,7 @@ template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> void
ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator = (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt)
{
ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator =");
- ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
+ ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
// Clear out the existing tree.
close_i ();
@@ -245,8 +245,8 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup (ACE_RB_Tre
{
ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup");
- while (x &&
- x->parent () &&
+ while (x &&
+ x->parent () &&
x->color () == ACE_RB_Tree_Node_Base::BLACK)
{
if (x == x->parent ()->left ())
@@ -260,8 +260,8 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup (ACE_RB_Tre
w = x->parent ()->right ();
}
// CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if ((w) &&
- (!w->left () ||
+ if ((w) &&
+ (!w->left () ||
w->left ()->color () == ACE_RB_Tree_Node_Base::BLACK) &&
(!w->right () ||
w->right ()->color () == ACE_RB_Tree_Node_Base::BLACK))
@@ -272,8 +272,8 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup (ACE_RB_Tre
else
{
// CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if (w &&
- (!w->right () ||
+ if (w &&
+ (!w->right () ||
w->right ()->color () == ACE_RB_Tree_Node_Base::BLACK))
{
w->left ()->color (ACE_RB_Tree_Node_Base::BLACK);
@@ -299,7 +299,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup (ACE_RB_Tre
w = x->parent ()->left ();
}
// CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if ((!w->left () ||
+ if ((!w->left () ||
w->left ()->color () == ACE_RB_Tree_Node_Base::BLACK) &&
(!w->right () ||
w->right ()->color () == ACE_RB_Tree_Node_Base::BLACK))
@@ -310,7 +310,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_delete_fixup (ACE_RB_Tre
else
{
// CLR pp. 263 says that nil nodes are implicitly colored BLACK
- if (!w->left () ||
+ if (!w->left () ||
w->left ()->color () == ACE_RB_Tree_Node_Base::BLACK)
{
w->right ()->color (ACE_RB_Tree_Node_Base::BLACK);
@@ -404,7 +404,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_rebalance (ACE_RB_Tree_N
ACE_RB_Tree_Node<EXT_ID, INT_ID> *y = 0;
- while (x &&
+ while (x &&
x->parent () &&
x->parent ()->color () == ACE_RB_Tree_Node_Base::RED)
{
@@ -553,7 +553,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::RB_tree_maximum (ACE_RB_Tre
// Close down an RB_Tree. this method should
// only be called with locks already held.
-template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
+template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
int
ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close_i ()
{
@@ -566,7 +566,7 @@ ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close_i ()
return 0;
}
-// Returns a pointer to the item corresponding to the given key,
+// Returns a pointer to the item corresponding to the given key,
// or 0 if it cannot find the key in the tree. This method should
// only be called with locks already held.
@@ -897,4 +897,3 @@ ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tr
#endif /* !defined (ACE_RB_TREE_C) */
-