/* Make a new index, empty. Consists of a single node. */
Node_t *RTreeNewIndex(RTree_t * rtp)
{
- Node_t *x = RTreeNewNode(rtp);
+ Node_t *x = RTreeNewNode();
x->level = 0; /* leaf */
return x;
}
if (RTreeInsert2(rtp, r, data, *n, &newnode, level)) { /* root was split */
- Node_t *newroot = RTreeNewNode(rtp); /* grow a new root, make tree taller */
+ Node_t *newroot = RTreeNewNode(); /* grow a new root, make tree taller */
newroot->level = (*n)->level + 1;
b.rect = NodeCover(*n);
b.child = *n;
/* Make a new node and initialize to have all branch cells empty.
*/
-Node_t *RTreeNewNode(RTree_t * rtp)
-{
+Node_t *RTreeNewNode(void) {
Node_t *n = malloc(sizeof(Node_t));
InitNode(n);
return n;
int AddBranch(RTree_t *, Branch_t *, Node_t *, Node_t **);
void DisconBranch(Node_t *, int);
void PrintBranch(int, Branch_t *);
-Node_t *RTreeNewNode(RTree_t *);
+Node_t *RTreeNewNode(void);
#ifdef RTDEBUG
void PrintNode(Node_t * n);
void PrintBranch(int i, Branch_t * b);
MethodZero(rtp);
/* put branches from buffer into 2 nodes according to chosen partition */
- *nn = RTreeNewNode(rtp);
+ *nn = RTreeNewNode();
(*nn)->level = n->level = level;
LoadNodes(rtp, n, *nn, p);
assert(n->count + (*nn)->count == NODECARD + 1);