Showing
1 changed file
with
2 additions
and
4 deletions
| @@ -28,6 +28,7 @@ TR_treeDelete(TR_Tree * this, const void * search, TR_TreeComp comp) | @@ -28,6 +28,7 @@ TR_treeDelete(TR_Tree * this, const void * search, TR_TreeComp comp) | ||
| 28 | { | 28 | { |
| 29 | TR_Tree node = *this; | 29 | TR_Tree node = *this; |
| 30 | TR_Tree del_node; | 30 | TR_Tree del_node; |
| 31 | + TR_Tree sibling; | ||
| 31 | int found; | 32 | int found; |
| 32 | 33 | ||
| 33 | void * data; | 34 | void * data; |
| @@ -104,10 +105,7 @@ TR_treeDelete(TR_Tree * this, const void * search, TR_TreeComp comp) | @@ -104,10 +105,7 @@ TR_treeDelete(TR_Tree * this, const void * search, TR_TreeComp comp) | ||
| 104 | * rebalancing process...(this does not make much sense, but | 105 | * rebalancing process...(this does not make much sense, but |
| 105 | * to be honest I don't know now.) | 106 | * to be honest I don't know now.) |
| 106 | */ | 107 | */ |
| 107 | - { | ||
| 108 | - TR_Tree sibling = TR_TREE_SIBLING(node); | ||
| 109 | - TR_TREE_BALANCE_DELETE(this, node, sibling); | ||
| 110 | - } | 108 | + TR_TREE_BALANCE_DELETE(this, node, sibling); |
| 111 | 109 | ||
| 112 | TR_delete(del_node); | 110 | TR_delete(del_node); |
| 113 | return data; | 111 | return data; |
Please
register
or
login
to post a comment