summaryrefslogtreecommitdiffstats
path: root/microbe/traverser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'microbe/traverser.cpp')
-rw-r--r--microbe/traverser.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/microbe/traverser.cpp b/microbe/traverser.cpp
index 3436d0c..eb6a924 100644
--- a/microbe/traverser.cpp
+++ b/microbe/traverser.cpp
@@ -54,7 +54,7 @@ BTreeNode * Traverser::start()
else n = n->left();
}
}
- //if(n->tqparent()) m_current = n->tqparent();
+ //if(n->parent()) m_current = n->parent();
//else m_current = n;
m_current = n;
return m_current;
@@ -62,22 +62,22 @@ BTreeNode * Traverser::start()
BTreeNode * Traverser::next()
{
- // a.t.m we will just take the next thing to be the tqparent.
- if( m_current != m_root ) m_current = m_current->tqparent();
+ // a.t.m we will just take the next thing to be the parent.
+ if( m_current != m_root ) m_current = m_current->parent();
return m_current;
}
bool Traverser::onLeftBranch()
{
- return current()->tqparent()->left() == current();
+ return current()->parent()->left() == current();
}
BTreeNode * Traverser::oppositeNode()
{
if ( onLeftBranch() )
- return current()->tqparent()->right();
+ return current()->parent()->right();
else
- return current()->tqparent()->left();
+ return current()->parent()->left();
}
void Traverser::descendLeftwardToTerminal()
@@ -95,6 +95,6 @@ void Traverser::descendLeftwardToTerminal()
void Traverser::moveToParent()
{
- if(current()->tqparent()) m_current = current()->tqparent();
+ if(current()->parent()) m_current = current()->parent();
}