aboutsummaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-23 17:51:51 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:21 +0100
commit8a36f868460bc62b3d485b07ca76c8136a799a8e (patch)
treef614e3959fb1091d860182d927d0b8ec8832ba20 /src/index.c
parenta2f3211f8efe701b79b7b4959066b0887d3027c4 (diff)
Do sanity check even with --cell-reduction=none
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/index.c b/src/index.c
index 0459540d..47866a18 100644
--- a/src/index.c
+++ b/src/index.c
@@ -151,19 +151,6 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
continue;
}
- if ( cellr == CELLR_NONE ) {
- image->indexed_cell = cell_new_from_cell(
- image->candidate_cells[0]);
- if ( verbose ) {
- STATUS("--------------------\n");
- STATUS("The indexed cell (matching not"
- " performed):\n");
- cell_print(image->indexed_cell);
- STATUS("--------------------\n");
- }
- goto done;
- }
-
for ( i=0; i<image->ncells; i++ ) {
UnitCell *new_cell = NULL;
@@ -179,7 +166,8 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
/* Match or reduce the cell as appropriate */
switch ( cellr ) {
case CELLR_NONE :
- /* Never happens */
+ new_cell = cell_new_from_cell(image
+ ->candidate_cells[i]);
break;
case CELLR_REDUCE :
new_cell = match_cell(image->candidate_cells[i],
@@ -218,7 +206,7 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm,
done:
for ( i=0; i<image->ncells; i++ ) {
- /* May free(NULL) if all algorithms were tried */
+ /* May free(NULL) if all algorithms were tried and no success */
cell_free(image->candidate_cells[i]);
}
}