- if (node->parent->left_child == node)
- node->parent->left_child = NULL;
- else
- node->parent->right_child = NULL;
- if (node->left_child != NULL)
- {
- node->left_child->parent = NULL;
- node->parent->tree_size -= (1 + node->left_child->tree_size);
- insert_node (heap, node->parent, node->left_child);
- }
- if (node->right_child != NULL)
- {
- node->right_child->parent = NULL;
- node->parent->tree_size -= (1 + node->right_child->tree_size);
- insert_node (heap, node->parent, node->right_child);
- }
+ node->left_child->parent = NULL;
+ node->parent->tree_size -= (1 + node->left_child->tree_size);
+ insert_node (heap, node->parent, node->left_child);