Added partially complete remove function.
This commit is contained in:
		
							parent
							
								
									ad7ad7d974
								
							
						
					
					
						commit
						d7d4efa0fb
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
		Loading…
	
		Reference in New Issue