Skip to content

Commit

Permalink
Remove unused code in function fix_rep_char
Browse files Browse the repository at this point in the history
This also fixes a compiler warning:

    src/ccmain/control.cpp:1694:9: warning: variable 'gap' set but not used [-Wunused-but-set-variable]

Fixes: dbf6197 ("Major refactor of control.cpp to enable line recognition")
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed May 8, 2023
1 parent 7cc215c commit 6b4eb8c
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/ccmain/control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1684,18 +1684,6 @@ void Tesseract::fix_rep_char(PAGE_RES_IT *page_res_it) {
}
word_res->done = true;

// Measure the mean space.
int gap_count = 0;
WERD *werd = word_res->word;
C_BLOB_IT blob_it(werd->cblob_list());
C_BLOB *prev_blob = blob_it.data();
for (blob_it.forward(); !blob_it.at_first(); blob_it.forward()) {
C_BLOB *blob = blob_it.data();
int gap = blob->bounding_box().left();
gap -= prev_blob->bounding_box().right();
++gap_count;
prev_blob = blob;
}
// Just correct existing classification.
CorrectRepcharChoices(best_choice, word_res);
word_res->reject_map.initialise(word.length());
Expand Down

0 comments on commit 6b4eb8c

Please sign in to comment.