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 @@ -351,8 +351,7 @@ size_t StringSearch<Char>::BoyerMooreSearch(
351351 // we have matched more than our tables allow us to be smart about.
352352 // Fall back on BMH shift.
353353 index += pattern_length - 1 -
354- CharOccurrence (bad_char_occurrence,
355- static_cast <Char>(last_char));
354+ CharOccurrence (bad_char_occurrence, last_char);
356355 } else {
357356 int gs_shift = good_suffix_shift[j + 1 ];
358357 int bc_occ = CharOccurrence (bad_char_occurrence, c);
@@ -449,7 +448,7 @@ size_t StringSearch<Char>::BoyerMooreHorspoolSearch(
449448 Char last_char = pattern_[pattern_length - 1 ];
450449 int last_char_shift =
451450 pattern_length - 1 -
452- CharOccurrence (char_occurrences, static_cast <Char>( last_char) );
451+ CharOccurrence (char_occurrences, last_char);
453452
454453 // Perform search
455454 size_t index = start_index; // No matches found prior to this index.
You can’t perform that action at this time.
0 commit comments