mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
cleanup: fix code smell knownConditionTrueFalse
Inner 'n_bytes >= 0' will always be true.
This commit is contained in:
@@ -1650,8 +1650,8 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
|
||||
letter_group = LetterGroupNo(rule++);
|
||||
if ((n_bytes = IsLetterGroup(tr, post_ptr-1, letter_group, 0)) >= 0) {
|
||||
add_points = (20-distance_right);
|
||||
if (n_bytes >= 0) // move pointer, if group was found
|
||||
post_ptr += (n_bytes-1);
|
||||
// move pointer, if group was found
|
||||
post_ptr += (n_bytes-1);
|
||||
} else
|
||||
failed = 1;
|
||||
break;
|
||||
@@ -1869,8 +1869,8 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
|
||||
letter_group = LetterGroupNo(rule++);
|
||||
if ((n_bytes = IsLetterGroup(tr, pre_ptr, letter_group, 1)) >= 0) {
|
||||
add_points = (20-distance_right);
|
||||
if (n_bytes >= 0) // move pointer, if group was found
|
||||
pre_ptr -= (n_bytes-1);
|
||||
// move pointer, if group was found
|
||||
pre_ptr -= (n_bytes-1);
|
||||
} else
|
||||
failed = 1;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user