mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 06:53:36 +08:00
Fix LGTM and revert bugfix for later PR
This commit is contained in:
parent
5f084891be
commit
a324c88563
@ -39,7 +39,7 @@ UNICHAR_ID UNICHARMAP::unichar_to_id(const char* const unichar_repr,
|
||||
assert(length > 0 && length <= UNICHAR_LEN);
|
||||
|
||||
int index = 0;
|
||||
if (unichar_repr[index] == '\0') return INVALID_UNICHAR_ID;
|
||||
if (length <= 0 || unichar_repr[index] == '\0') return INVALID_UNICHAR_ID;
|
||||
do {
|
||||
if (index + 1 >= length || unichar_repr[index + 1] == '\0')
|
||||
return current_nodes[static_cast<unsigned char>(unichar_repr[index])].id;
|
||||
|
@ -618,7 +618,6 @@ void TrainingSampleSet::ComputeCanonicalSamples(const IntFeatureMap& map,
|
||||
if (dist > max_dist) {
|
||||
max_dist = dist;
|
||||
if (dist > max_max_dist) {
|
||||
max_max_dist = dist;
|
||||
max_s1 = s1;
|
||||
max_s2 = s2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user