Reindent function
This commit is contained in:
1 parent
7761fb6bf1
commit
9710e014f2
1 file changed
+27
-26
+27
-26
@@ -202,7 +202,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Internal contract of a B+TREE node */
|
/* Internal contract of a B+TREE node 'node' or root 'root' */
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
# define BPTREEI_NODE_CONTRACT(N, isMulti, key_oplist, node, root) do { } while (0)
|
# define BPTREEI_NODE_CONTRACT(N, isMulti, key_oplist, node, root) do { } while (0)
|
||||||
#else
|
#else
|
||||||
@@ -406,27 +406,28 @@
|
|||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static inline node_t M_C(name, _copy_node)(const node_t o, const node_t root) \
|
static inline node_t M_C(name, _copy_node)(const node_t o, const node_t root) \
|
||||||
{ \
|
{ \
|
||||||
node_t n = M_C(name, _new_node)(); \
|
node_t n = M_C(name, _new_node)(); \
|
||||||
n->num = o->num; \
|
n->num = o->num; \
|
||||||
n->next = NULL; \
|
n->next = NULL; \
|
||||||
int num = M_C(name, _get_num)(o); \
|
int num = M_C(name, _get_num)(o); \
|
||||||
for(int i = 0; i < num; i++) { \
|
for(int i = 0; i < num; i++) { \
|
||||||
M_CALL_INIT_SET(key_oplist, n->key[i], o->key[i]); \
|
M_CALL_INIT_SET(key_oplist, n->key[i], o->key[i]); \
|
||||||
} \
|
} \
|
||||||
if (M_C(name, _is_leaf)(o)) { \
|
if (M_C(name, _is_leaf)(o)) { \
|
||||||
M_IF(isMap)( \
|
M_IF(isMap)( \
|
||||||
for(int i = 0; i < num; i++) { \
|
for(int i = 0; i < num; i++) { \
|
||||||
M_CALL_INIT_SET(value_oplist, n->kind.value[i], o->kind.value[i]); \
|
M_CALL_INIT_SET(value_oplist, n->kind.value[i], o->kind.value[i]); \
|
||||||
} \
|
} \
|
||||||
,) \
|
, /* End of isMap */) \
|
||||||
} else { \
|
} else { \
|
||||||
for(int i = 0; i <= num; i++) { \
|
/* Not a leaf */ \
|
||||||
|
for(int i = 0; i <= num; i++) { \
|
||||||
assert(o->kind.node[i] != root); \
|
assert(o->kind.node[i] != root); \
|
||||||
n->kind.node[i] = M_C(name, _copy_node)(o->kind.node[i], root); \
|
n->kind.node[i] = M_C(name, _copy_node)(o->kind.node[i], root); \
|
||||||
} \
|
} \
|
||||||
for(int i = 0; i < num; i++) { \
|
for(int i = 0; i < num; i++) { \
|
||||||
node_t current = n->kind.node[i]; \
|
node_t current = n->kind.node[i]; \
|
||||||
node_t next = n->kind.node[i+1]; \
|
node_t next = n->kind.node[i+1]; \
|
||||||
current->next = next; \
|
current->next = next; \
|
||||||
while (!M_C(name, _is_leaf)(current)) { \
|
while (!M_C(name, _is_leaf)(current)) { \
|
||||||
@@ -435,13 +436,13 @@
|
|||||||
next = next->kind.node[0]; \
|
next = next->kind.node[0]; \
|
||||||
current->next = next; \
|
current->next = next; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
BPTREEI_NODE_CONTRACT(N, isMulti, key_oplist, n, (o==root) ? n : root); \
|
BPTREEI_NODE_CONTRACT(N, isMulti, key_oplist, n, (o==root) ? n : root); \
|
||||||
return n; \
|
return n; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static inline void M_C(name, _init_set)(tree_t b, const tree_t o) \
|
static inline void M_C(name, _init_set)(tree_t b, const tree_t o) \
|
||||||
{ \
|
{ \
|
||||||
BPTREEI_CONTRACT(N, isMulti, key_oplist, o); \
|
BPTREEI_CONTRACT(N, isMulti, key_oplist, o); \
|
||||||
assert (b != NULL); \
|
assert (b != NULL); \
|
||||||
|
|||||||
Reference in new issue
Block a user