summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ix3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ix3.c b/src/ix3.c
index 81a71c3..3cdc5d1 100644
--- a/src/ix3.c
+++ b/src/ix3.c
@@ -426,7 +426,7 @@ static ix3_object_t * add_object(ix3_t *ix3, unsigned *depth, ix3_node_t *node,
bb3f_t octrants[8];
int i;
- *depth++;
+ (*depth)++;
init_octrants(octrants, node_aabb, &node->center);
for (i = 0; i < 8; i++) {
if (!aabb_overlap(NULL, NULL, &octrants[i], &object->position, &object->origin, &object->aabb))
@@ -435,7 +435,7 @@ static ix3_object_t * add_object(ix3_t *ix3, unsigned *depth, ix3_node_t *node,
if (!add_object(ix3, depth, &node->children[i], &octrants[i], object, reference_cache))
goto _fail;
}
- *depth--;
+ (*depth)--;
return object;
}
@@ -446,10 +446,10 @@ static ix3_object_t * add_object(ix3_t *ix3, unsigned *depth, ix3_node_t *node,
/* If the node is overflowing, split it */
if (node->n_objects > ix3->max_per_node && *depth < ix3->max_depth) {
- *depth++;
+ (*depth)++;
if (!split_node(ix3, depth, node, node_aabb))
goto _fail;
- *depth--;
+ (*depth)--;
}
return object;
© All Rights Reserved