summaryrefslogtreecommitdiffstats
path: root/microbe/btreebase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'microbe/btreebase.cpp')
-rw-r--r--microbe/btreebase.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/microbe/btreebase.cpp b/microbe/btreebase.cpp
index 7117b26..b45f983 100644
--- a/microbe/btreebase.cpp
+++ b/microbe/btreebase.cpp
@@ -41,14 +41,14 @@ BTreeBase::~BTreeBase()
}
-void BTreeBase::addNode(BTreeNode *tqparent, BTreeNode *node, bool left)
+void BTreeBase::addNode(BTreeNode *parent, BTreeNode *node, bool left)
{
// Debugging lines, remove when expression parsing has been completed.
- //if(!tqparent) cerr<<"Null tqparent pointer!\n";
+ //if(!parent) cerr<<"Null parent pointer!\n";
//if(!node) cerr<<"Null node pointer!\n");
- if(left) tqparent->setLeft(node);
- else tqparent->setRight(node);
+ if(left) parent->setLeft(node);
+ else parent->setRight(node);
}
void BTreeBase::pruneTree(BTreeNode *root, bool /*conditionalRoot*/)
@@ -60,7 +60,7 @@ void BTreeBase::pruneTree(BTreeNode *root, bool /*conditionalRoot*/)
while(!done)
{
//t.descendLeftwardToTerminal();
- if( t.current()->tqparent() )
+ if( t.current()->parent() )
{
if( t.oppositeNode()->hasChildren() ) pruneTree(t.oppositeNode());
}
@@ -69,7 +69,7 @@ void BTreeBase::pruneTree(BTreeNode *root, bool /*conditionalRoot*/)
if( !t.current()->hasChildren() )
{
//if(t.current() == t.root()) done = true;
- if(!t.current()->tqparent()) done = true;
+ if(!t.current()->parent()) done = true;
continue;
}
@@ -226,7 +226,7 @@ void BTreeBase::pruneTree(BTreeNode *root, bool /*conditionalRoot*/)
}
}
- if(!t.current()->tqparent() || t.current() == root) done = true;
+ if(!t.current()->parent() || t.current() == root) done = true;
else
{
@@ -237,12 +237,12 @@ void BTreeBase::pruneTree(BTreeNode *root, bool /*conditionalRoot*/)
void BTreeBase::replaceNode(BTreeNode *node, BTreeNode *replacement)
{
// (This works under the assumption that a node is not linked to two places at once).
- if( !node->tqparent() )
+ if( !node->parent() )
{
setRoot(replacement);
replacement->setParent(0L);
return;
}
- if( node->tqparent()->left() == node ) node->tqparent()->setLeft(replacement);
- if( node->tqparent()->right() == node ) node->tqparent()->setRight(replacement);
+ if( node->parent()->left() == node ) node->parent()->setLeft(replacement);
+ if( node->parent()->right() == node ) node->parent()->setRight(replacement);
}