[dasher] Removed unused Recursive_Push_Node method. (well, inlined into it's



commit 1629c869fd67fa1c5045f6357fc5563f27650ebe
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Fri May 15 17:43:51 2009 +0100

    Removed unused Recursive_Push_Node method. (well, inlined into it's
    single caller, which didn't use the recursion!)
---
 ChangeLog                      |    3 ++-
 Src/DasherCore/DasherModel.cpp |   25 ++++---------------------
 Src/DasherCore/DasherModel.h   |    4 ----
 3 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e9de9ac..67fa3ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-05-15  Alan Lawrence <acl33 inf phy cam ac uk>
 
-	* Backport to OS X 10.4 universal binary for PPC
+	* Backport to OS X 10.4 universal binary for PPC.
+	* DasherModel.{h,cpp}: Remove unused Recursive_Push_Node method.
 
 2009-05-14  Patrick Welche  <prlw1 cam ac uk>
 
diff --git a/Src/DasherCore/DasherModel.cpp b/Src/DasherCore/DasherModel.cpp
index 53bb6cf..f8cce6d 100644
--- a/Src/DasherCore/DasherModel.cpp
+++ b/Src/DasherCore/DasherModel.cpp
@@ -351,8 +351,10 @@ void CDasherModel::InitialiseAtOffset(int iOffset, CDasherView *pView) {
   // Create children of the root
   // TODO: What about parents?
 
-  Recursive_Push_Node(m_Root, 0);
-
+  if(m_Root->Range() >= 0.1 * GetLongParameter(LP_NORMALIZATION)) {
+    Push_Node(m_Root);
+  }
+	
   // Set the root coordinates so that the root node is an appropriate
   // size and we're not in any of the children
 
@@ -831,25 +833,6 @@ void CDasherModel::Push_Node(CDasherNode *pNode) {
 
 }
 
-void CDasherModel::Recursive_Push_Node(CDasherNode *pNode, int iDepth) {
-  // TODO: is this really useful? Doesn't Push_node itself recurse
-
-  DASHER_ASSERT(pNode != NULL);
-
-  if(pNode->Range() < 0.1 * GetLongParameter(LP_NORMALIZATION)) {
-    return;
-  }
-
-  Push_Node(pNode);
-
-  if(iDepth == 0)
-    return;
-
-  for(unsigned int i(0); i < pNode->ChildCount(); i++) {
-    Recursive_Push_Node(pNode->Children()[i], iDepth - 1);
-  }
-}
-
 bool CDasherModel::RenderToView(CDasherView *pView, bool bRedrawDisplay, SLockData *pLockData) {
 
   if(pLockData)
diff --git a/Src/DasherCore/DasherModel.h b/Src/DasherCore/DasherModel.h
index 4aebe39..fef7514 100644
--- a/Src/DasherCore/DasherModel.h
+++ b/Src/DasherCore/DasherModel.h
@@ -354,10 +354,6 @@ class Dasher::CDasherModel:public Dasher::CDasherComponent, private NoClones
   /// Called from InitialiseAtOffset
   void DeleteTree();
 
-  /// Push nodes recursively (d'oh!) - seems to be a little broken at the moment, need to check where this gets called
-  /// TODO: Need to sort out, need to check that this isn't generating too many nodes
-  void Recursive_Push_Node(CDasherNode * pNode, int depth);
-
   /// Create the children of a Dasher node
   void Push_Node(CDasherNode * pNode); 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]