summaryrefslogtreecommitdiff
path: root/src/ix2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ix2.c')
-rw-r--r--src/ix2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ix2.c b/src/ix2.c
index e87cf2c..da02f07 100644
--- a/src/ix2.c
+++ b/src/ix2.c
@@ -368,7 +368,7 @@ static ix2_object_t * add_object(ix2_t *ix2, unsigned *depth, ix2_node_t *node,
bb2f_t quadrants[4];
int i;
- *depth++;
+ (*depth)++;
init_quadrants(quadrants, node_aabb, &node->center);
for (i = 0; i < 4; i++) {
if (!aabb_overlap(NULL, NULL, &quadrants[i], &object->position, &object->origin, &object->aabb))
@@ -377,7 +377,7 @@ static ix2_object_t * add_object(ix2_t *ix2, unsigned *depth, ix2_node_t *node,
if (!add_object(ix2, depth, &node->children[i], &quadrants[i], object, reference_cache))
goto _fail;
}
- *depth--;
+ (*depth)--;
return object;
}
@@ -388,10 +388,10 @@ static ix2_object_t * add_object(ix2_t *ix2, unsigned *depth, ix2_node_t *node,
/* If the node is overflowing, split it */
if (node->n_objects > ix2->max_per_node && *depth < ix2->max_depth) {
- *depth++;
+ (*depth)++;
if (!split_node(ix2, depth, node, node_aabb))
goto _fail;
- *depth--;
+ (*depth)--;
}
return object;
© All Rights Reserved