From d7d4efa0fbbdca2f77358dc137074138e53790cc Mon Sep 17 00:00:00 2001 From: "A.G. Lalis" Date: Fri, 12 Jan 2018 08:41:50 +0100 Subject: [PATCH] Added partially complete remove function. --- source/handytree.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/handytree.h b/source/handytree.h index 2fee385..7b85855 100644 --- a/source/handytree.h +++ b/source/handytree.h @@ -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 \ No newline at end of file