mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
UNICHARMAP: Remove comparison which is always false
Warning from LGTM: Comparison is always false because index <= 0 and 1 <= length. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
3ae765ecca
commit
30b75cfc05
@ -83,7 +83,7 @@ bool UNICHARMAP::contains(const char* const unichar_repr,
|
||||
if (unichar_repr == nullptr || *unichar_repr == '\0') return false;
|
||||
if (length <= 0 || length > UNICHAR_LEN) return false;
|
||||
int index = 0;
|
||||
if (index >= length || unichar_repr[index] == '\0') return false;
|
||||
if (unichar_repr[index] == '\0') return false;
|
||||
UNICHARMAP_NODE* current_nodes = nodes;
|
||||
|
||||
while (current_nodes != nullptr && index + 1 < length &&
|
||||
|
Loading…
Reference in New Issue
Block a user