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 /src/post-refinement.c | |
parent | 760f17f56b7f79f67a9029cbe7cc55a0acccd3b9 (diff) |
Reduce variable scope where possible
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r-- | src/post-refinement.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c index 27a8cd6a..c6ff3974 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -268,10 +268,8 @@ static void try_reindex(Crystal *crin, const RefList *full, SymOpList *sym, SymOpList *amb, int scaleflags, PartialityModel pmodel) { - RefList *list; Crystal *cr; - UnitCell *cell; - double residual_original, residual_flipped; + double residual_original; int idx, n; if ( sym == NULL || amb == NULL ) return; @@ -285,6 +283,10 @@ static void try_reindex(Crystal *crin, const RefList *full, for ( idx=0; idx<n; idx++ ) { + RefList *list; + UnitCell *cell; + double residual_flipped; + cell = cell_new_from_cell(crystal_get_cell(crin)); if ( cell == NULL ) return; reindex_cell(cell, amb, idx); |