Browse Source

small fix in tree find

1.0.2
Georg Hopp 12 years ago
parent
commit
08d22ebcd6
  1. 5
      include/tr/tree_macros.h

5
include/tr/tree_macros.h

@ -116,12 +116,11 @@ typedef enum {rbBlack=1, rbRed=2} TR_rbColor;
while(1) { \
(found) = (comp)((node)->data, (search)); \
if (0 != (found)) { \
if (! ((node)->left || (node)->right)) { \
break; \
} \
if (0 < (found)) { \
if (! (node)->left) break; \
(node) = (node)->left; \
} else { \
if (! (node)->right) break; \
(node) = (node)->right; \
} \
} else { \

Loading…
Cancel
Save