From e47aaa9b34ffc363d268aca989aab28fdfaf9821 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 22:19:39 +0000 Subject: rename the following methods: tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- microbe/btreebase.cpp | 20 ++++++++++---------- microbe/btreebase.h | 6 +++--- microbe/btreenode.h | 6 +++--- microbe/instruction.cpp | 2 +- microbe/optimizer.cpp | 6 +++--- microbe/traverser.cpp | 14 +++++++------- microbe/traverser.h | 6 +++--- 7 files changed, 30 insertions(+), 30 deletions(-) (limited to 'microbe') 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); } diff --git a/microbe/btreebase.h b/microbe/btreebase.h index 8b9d6f0..d8d1040 100644 --- a/microbe/btreebase.h +++ b/microbe/btreebase.h @@ -38,10 +38,10 @@ public: void setRoot(BTreeNode *root){m_root = root; } /** Link the node into the tree. a.t.m all this really - does it sets the tqparent/child relationship pointers, + does it sets the parent/child relationship pointers, but is used in case something needs to be changed in the future Added to the left if left == true or the right if left == false */ - void addNode(BTreeNode *tqparent, BTreeNode *node, bool left); + void addNode(BTreeNode *parent, BTreeNode *node, bool left); /** Deletes all nodes in tree and zeros pointer to root node */ void deleteTree(); @@ -49,7 +49,7 @@ public: /** Tidies the tree up; merging constants and removing redundant branches */ void pruneTree(BTreeNode *root, bool conditionalRoot = true); - /** Put a node in place of another, linking it correctly into the tqparent. */ + /** Put a node in place of another, linking it correctly into the parent. */ void replaceNode(BTreeNode *node, BTreeNode *replacement); protected: diff --git a/microbe/btreenode.h b/microbe/btreenode.h index 2594d0c..ceed185 100644 --- a/microbe/btreenode.h +++ b/microbe/btreenode.h @@ -50,9 +50,9 @@ class BTreeNode */ void deleteChildren(); /** - * @return the tqparent node. + * @return the parent node. */ - BTreeNode *tqparent() const { return m_parent; } + BTreeNode *parent() const { return m_parent; } /** * @return the left child node. */ @@ -61,7 +61,7 @@ class BTreeNode * @return the right child node. */ BTreeNode *right() const { return m_right; } - void setParent(BTreeNode *tqparent) { m_parent = tqparent; } + void setParent(BTreeNode *parent) { m_parent = parent; } /** * Set the child node on the left to the one give, and reparents it to * this node. diff --git a/microbe/instruction.cpp b/microbe/instruction.cpp index 5e41fc8..80a63cc 100644 --- a/microbe/instruction.cpp +++ b/microbe/instruction.cpp @@ -806,7 +806,7 @@ void Code::merge( Code * code, InstructionPosition middleInsertionPosition ) if ( !code ) return; - // Retqparent instructions + // Reparent instructions for ( unsigned i = 0; i < PositionCount; ++i ) { InstructionList * list = code->instructionList( (InstructionPosition)i ); diff --git a/microbe/optimizer.cpp b/microbe/optimizer.cpp index 03e3110..1c8ce13 100644 --- a/microbe/optimizer.cpp +++ b/microbe/optimizer.cpp @@ -386,8 +386,8 @@ bool Optimizer::optimizeInstructions() { // If we are testing STATUS, then we assume that the bits changed // are only those that are marked as independent. - uchar bittqmask = ( i == 1 ) ? behaviour.reg( Register::STATUS ).indep : 0xff; - if ( !canRemove( *it, (i == 0) ? regSet : Register::STATUS, bittqmask ) ) + uchar bitmask = ( i == 1 ) ? behaviour.reg( Register::STATUS ).indep : 0xff; + if ( !canRemove( *it, (i == 0) ? regSet : Register::STATUS, bitmask ) ) { ok = false; break; @@ -479,7 +479,7 @@ bool Optimizer::canRemove( Instruction * ins, const Register & reg, uchar bitMas // The bits that are depended upon in the future for this register uchar depends = generateRegisterDepends( ins, reg ); - // Only interested in those bits allowed by the bit tqmask + // Only interested in those bits allowed by the bit mask depends &= bitMask; RegisterState inputState = ins->inputState().reg( reg ); 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(); } diff --git a/microbe/traverser.h b/microbe/traverser.h index a0fcd77..7593ba7 100644 --- a/microbe/traverser.h +++ b/microbe/traverser.h @@ -45,7 +45,7 @@ public: /** Returns true if we are on the left branch, false otherwise. */ bool onLeftBranch(); - /** Returns the node on the opposite branch of the tqparent. */ + /** Returns the node on the opposite branch of the parent. */ BTreeNode * oppositeNode(); BTreeNode * current() const { return m_current; } @@ -57,8 +57,8 @@ public: */ void descendLeftwardToTerminal(); - /** It might occur in the future that next() does not just move to the tqparent, - so use this for moving to tqparent + /** It might occur in the future that next() does not just move to the parent, + so use this for moving to parent */ void moveToParent(); -- cgit v1.2.1