void Cellspace::makenull(TREE root) { if (root == -1) return; int id = nodes[root].get_leftmost_child(); TNode node; if (id != -1) { node = nodes[id]; makenull(id); id = node.get_right_sibling(); while (id != -1) { makenull(id); node = nodes[id]; id = node.get_right_sibling(); } } node = nodes[root]; node.set_label(NULL); node.set_parent(-1); node.set_leftmost_child(-1); node.set_right_sibling(-1); }