Renamed a member function to more accurately reflect its purpose

git-svn-id: svn://10.0.0.236/trunk@40956 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com
1999-07-24 02:46:08 +00:00
parent 448fbdd0ee
commit 37565e5645
2 changed files with 6 additions and 6 deletions

View File

@@ -137,10 +137,10 @@ nsDST::Insert(void* aKey, void* aValue)
return previousValue;
}
// Helper function that returns one of the leaf nodes of the specified
// Helper function that returns the left most leaf node of the specified
// subtree
nsDST::Node**
nsDST::FindLeafNode(Node** aNode) const
nsDST::GetLeftMostLeafNode(Node** aNode) const
{
keepLooking:
// See if the node has none, one, or two child nodes
@@ -150,7 +150,7 @@ keepLooking:
goto keepLooking;
} else if ((*aNode)->mRight) {
// Walk down the right branch
// No left branch, so walk down the right branch
aNode = &(*aNode)->mRight;
goto keepLooking;
@@ -182,8 +182,8 @@ nsDST::Remove(void* aKey)
} else {
// We can't just move the left or right subtree up one level, because
// then we would have to re-sort the tree. Instead replace the node
// with any leaf node below it in the tree
Node** leaf = FindLeafNode(node);
// with the left most leaf node
Node** leaf = GetLeftMostLeafNode(node);
// Copy over both the left and right subtree pointers
if ((*node)->mLeft != (*leaf)) {

View File

@@ -85,7 +85,7 @@ private:
private:
// Helper functions
Node** SearchTree(void* aKey) const;
Node** FindLeafNode(Node** aNode) const;
Node** GetLeftMostLeafNode(Node** aNode) const;
void DestroyNode(Node* aNode);
#ifdef NS_DEBUG