Fix some issues which were reported by Codacy#4266
Merged
stweil merged 2 commits intotesseract-ocr:mainfrom Jun 11, 2024
Merged
Fix some issues which were reported by Codacy#4266stweil merged 2 commits intotesseract-ocr:mainfrom
stweil merged 2 commits intotesseract-ocr:mainfrom
Conversation
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Apply also some smaller optimizations and add TODO comments for local variables which require further examination. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Member
Author
|
According to Codacy this pull request fixes about 32 issues (from a total of currently 590 issues), so much more work remains to be done. |
Contributor
|
Is it possible to use auto in more places? |
egorpugin
approved these changes
Jun 11, 2024
| int16_t row_no = 0; | ||
| while (page_res_it.word() != nullptr && page_res_it.block() == current_block) { | ||
| current_row = page_res_it.row(); | ||
| ROW_RES *current_row = page_res_it.row(); |
| page_res_it.restart_page(); | ||
| while (page_res_it.word() != nullptr) { | ||
| word = page_res_it.word(); | ||
| WERD_RES *word = page_res_it.word(); |
| while ((best_score != PERFECT_WERDS) && !current_perm.empty()) { | ||
| match_current_words(current_perm, row, block); | ||
| current_score = eval_word_spacing(current_perm); | ||
| int16_t current_score = eval_word_spacing(current_perm); |
|
|
||
| for (src_it.mark_cycle_pt(); !src_it.cycled_list(); src_it.forward()) { | ||
| src_wd = src_it.data(); | ||
| WERD_RES *src_wd = src_it.data(); |
Member
Author
Yes, sure, but sometimes I want to be able to see the data types explicitly for myself, and in other cases more work is needed to verify that Maybe some tools can |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.