diff options
author | Thomas White <taw@physics.org> | 2021-07-21 13:26:37 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-07-21 15:34:33 +0200 |
commit | 7e5536832b22036a634a74e16073b4762a416e29 (patch) | |
tree | 25799eb139d235f524a80c53fb25d0c9f64eb6f1 /libcrystfel/src/peaks.c | |
parent | 760f17f56b7f79f67a9029cbe7cc55a0acccd3b9 (diff) |
Reduce variable scope where possible
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r-- | libcrystfel/src/peaks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 689239e5..d260b66d 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -288,7 +288,6 @@ static void search_peaks_in_panel(struct image *image, float threshold, double grad; int mask_fs, mask_ss; int s_fs, s_ss; - double max; unsigned int did_something; int r; int saturated; @@ -321,6 +320,7 @@ static void search_peaks_in_panel(struct image *image, float threshold, do { + double max; max = data[mask_fs+stride*mask_ss]; did_something = 0; @@ -589,7 +589,6 @@ int indexing_peak_check(struct image *image, Crystal **crystals, int n_cryst, struct imagefeature *f; double q[3]; - double h,k,l,hd,kd,ld; int j; int ok = 0; @@ -604,6 +603,7 @@ int indexing_peak_check(struct image *image, Crystal **crystals, int n_cryst, double bx, by, bz; double cx, cy, cz; double dx, dy; + double h,k,l,hd,kd,ld; crystal_get_det_shift(crystals[j], &dx, &dy); |