Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
question on the GetDeepestMatchingPosition function
(1/1)
ollydbg:
This is a bit strange.
--- Code: ---inline unsigned int SearchTreeNode::GetDeepestMatchingPosition(BasicSearchTree* tree, const wxString& s,unsigned int StringStartDepth)
--- End code ---
I carefully examined the code, I found that the above function will always be called with the parameter StringStartDepth==0.
The only existence of this call is in FindNode().
--- Code: ---bool BasicSearchTree::FindNode(const wxString& s, nSearchTreeNode nparent, SearchTreePoint* result)
{
size_t top_depth = m_pNodes[nparent]->GetDepth();
......
unsigned int newdepth = childnode->GetDeepestMatchingPosition(this,s,top_depth);
......
}
--- End code ---
But all the FindNode() function was used like below( the second parameter is always 0 )
--- Code: ---FindNode(s, 0, &resultpos)
--- End code ---
So, the root node's parent is itself. and its depth is surely zero.
Any comments? Thanks.
Navigation
[0] Message Index
Go to full version