From 30b75cfc0580286eef628812bdd4f5b217278eaa Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Mon, 8 Oct 2018 14:15:17 +0200 Subject: [PATCH] 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 --- src/ccutil/unicharmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ccutil/unicharmap.cpp b/src/ccutil/unicharmap.cpp index 236f6b72e3..4f7b266f40 100644 --- a/src/ccutil/unicharmap.cpp +++ b/src/ccutil/unicharmap.cpp @@ -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 &&