diff --git a/src/string_search.h b/src/string_search.h index 358a4c1b024e67..4929ccbcfd02fe 100644 --- a/src/string_search.h +++ b/src/string_search.h @@ -351,8 +351,7 @@ size_t StringSearch::BoyerMooreSearch( // we have matched more than our tables allow us to be smart about. // Fall back on BMH shift. index += pattern_length - 1 - - CharOccurrence(bad_char_occurrence, - static_cast(last_char)); + CharOccurrence(bad_char_occurrence, last_char); } else { int gs_shift = good_suffix_shift[j + 1]; int bc_occ = CharOccurrence(bad_char_occurrence, c); @@ -449,7 +448,7 @@ size_t StringSearch::BoyerMooreHorspoolSearch( Char last_char = pattern_[pattern_length - 1]; int last_char_shift = pattern_length - 1 - - CharOccurrence(char_occurrences, static_cast(last_char)); + CharOccurrence(char_occurrences, last_char); // Perform search size_t index = start_index; // No matches found prior to this index.