aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-10-01 11:08:18 +0200
committerThomas White <taw@physics.org>2020-10-01 11:08:18 +0200
commit5edd5c1f3ced6063d4b0ecfd4e07a0c9bee29fa4 (patch)
treec9ccd372e6ca339eecf9311c9ba7ed99f19adb39
parent0bd5696e3ccd0859cae54348f8536dee265eb27c (diff)
asdf: Replace weird loop syntax
-rw-r--r--libcrystfel/src/indexers/asdf.c9
1 files 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;