Skip to content

Commit

Permalink
improve unit test & add delete min / max for splaytree
Browse files Browse the repository at this point in the history
- improve unit test coverage for tree-family
- add delete min / max to splay tree
  • Loading branch information
fritzprix committed Jun 13, 2016
1 parent 8edd2b8 commit 52ae28a
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 143 deletions.
4 changes: 4 additions & 0 deletions source/cdsl_nrbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ nrbtreeNode_t* cdsl_nrbtreeDeleteMin(nrbtreeRoot_t* rootp)
{
if(!rootp)
return NULL;
if(!GET_PTR(rootp->entry))
return NULL;
nrbtreeNode_t* del = NULL;
uint8_t ctx = 0;
rootp->entry = delete_lm_rc(rootp->entry, &del, &ctx);
Expand All @@ -144,6 +146,8 @@ nrbtreeNode_t* cdsl_nrbtreeDeleteMax(nrbtreeRoot_t* rootp)
{
if(!rootp)
return NULL;
if(!GET_PTR(rootp->entry))
return NULL;
nrbtreeNode_t* del = NULL;
uint8_t ctx = 0;
rootp->entry = delete_rm_rc(rootp->entry, &del, &ctx);
Expand Down
Loading

0 comments on commit 52ae28a

Please sign in to comment.