other minor simplifications.

This commit is contained in:
Antonio Carzaniga 2019-08-21 10:26:58 +02:00
parent 576139b448
commit 90f9766a87

View File

@ -231,7 +231,7 @@ void c_index_build() {
struct bt_node ** c_index_stack = 0; struct bt_node ** c_index_stack = 0;
unsigned int c_index_stack_top = 0; unsigned int c_index_stack_top = 0;
void c_index_stack_clear() { static void c_index_stack_clear() {
c_index_stack_top = 0; c_index_stack_top = 0;
} }
@ -264,9 +264,8 @@ void c_index_check_collisions() {
do { do {
ball_collision(n->ball, b); ball_collision(n->ball, b);
if (c_index_must_check(n->left, b)) { if (c_index_must_check(n->left, b)) {
if (c_index_must_check(n->right, b)) { if (c_index_must_check(n->right, b))
c_index_stack_push(n->right); c_index_stack_push(n->right);
}
n = n->left; n = n->left;
} else if (c_index_must_check(n->right, b)) { } else if (c_index_must_check(n->right, b)) {
n = n->right; n = n->right;