From 8a36f868460bc62b3d485b07ca76c8136a799a8e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 23 Mar 2011 17:51:51 +0100 Subject: Do sanity check even with --cell-reduction=none --- src/index.c | 18 +++--------------- 1 file 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; incells; 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; incells; 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]); } } -- cgit v1.2.3