9 lines
230 B
C
9 lines
230 B
C
|
//bintree宏定义
|
||
|
|
||
|
#include "binnode.hpp"
|
||
|
|
||
|
#define isRoot(x) (!(x->parent))
|
||
|
#define isLC(x) (!isRoot(x)&&((x)==(x->parent->lc))
|
||
|
#define isRC(x) (!isRoot(x)&&((x)==(x->parent->rc))
|
||
|
#define hasLC(x) (x->lc)
|
||
|
#define hasRC(x) (x->rc)
|