Added partially complete remove function.

This commit is contained in:
A.G. Lalis 2018-01-12 08:41:50 +01:00
parent ad7ad7d974
commit d7d4efa0fb
1 changed files with 12 additions and 0 deletions

View File

@ -95,4 +95,16 @@ void TEMPLATE(addNode,TREE_NODE)(TREE_NODE* node, TREE_NODE newChild){
memcpy(node->children, oldChildren, node->)
}
/*
Remove a node:
Removes a node from a given parent, referenced by a pointer.
*/
void TEMPLATE(remove,TREE_NODE)(TREE_NODE* parent, TREE_NODE* child){
for (int i = 0; i < parent->childCount; i++){
if (parent->children[i] == child){
}
}
}
#endif