File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -348,8 +348,7 @@ size_t StringSearch<Char>::BoyerMooreSearch(
348348 // we have matched more than our tables allow us to be smart about.
349349 // Fall back on BMH shift.
350350 index += pattern_length - 1 -
351- CharOccurrence (bad_char_occurrence,
352- static_cast <Char>(last_char));
351+ CharOccurrence (bad_char_occurrence, last_char);
353352 } else {
354353 int gs_shift = good_suffix_shift[j + 1 ];
355354 int bc_occ = CharOccurrence (bad_char_occurrence, c);
@@ -446,7 +445,7 @@ size_t StringSearch<Char>::BoyerMooreHorspoolSearch(
446445 Char last_char = pattern_[pattern_length - 1 ];
447446 int last_char_shift =
448447 pattern_length - 1 -
449- CharOccurrence (char_occurrences, static_cast <Char>( last_char) );
448+ CharOccurrence (char_occurrences, last_char);
450449
451450 // Perform search
452451 size_t index = start_index; // No matches found prior to this index.
You can’t perform that action at this time.
0 commit comments