From 5edd5c1f3ced6063d4b0ecfd4e07a0c9bee29fa4 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 1 Oct 2020 11:08:18 +0200 Subject: asdf: Replace weird loop syntax --- libcrystfel/src/indexers/asdf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libcrystfel/src/indexers/asdf.c b/libcrystfel/src/indexers/asdf.c index 1536a109..e72dcea1 100644 --- a/libcrystfel/src/indexers/asdf.c +++ b/libcrystfel/src/indexers/asdf.c @@ -802,15 +802,18 @@ static int find_cell(struct tvector *tvectors, int N_tvectors, double IndexFit, int i_min = sl < 2 * N_tvectors ? 0 : sl - 2 * N_tvectors; int i_max = sl < N_tvectors ? sl : N_tvectors; - for ( i = i_min; i < i_max; i++) if (tvectors[i].n > acl ) { + for ( i = i_min; i < i_max; i++) { + + if (tvectors[i].n <= acl ) continue; int j_min = sl - N_tvectors - 2 * i - 1 < 0 ? i + 1 : sl - N_tvectors - i; int j_max = sl - N_tvectors - i < 0 ? sl - i : N_tvectors; - for ( j = j_min; j < j_max; j++ ) - if ( tvectors[j].n > acl ) { + for ( j = j_min; j < j_max; j++ ) { + + if ( tvectors[j].n <= acl ) continue; k = sl - i - j - 1; -- cgit v1.2.3