Commit ef135e53 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

Add cast to make Win-64 compile without warnings. This is a commit of...

Add cast to make Win-64 compile without warnings.  This is a commit of http://codereview.chromium.org/3521002 for lrn.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3614edeb
......@@ -334,8 +334,9 @@ int StringSearch<PatternChar, SubjectChar>::BoyerMooreSearch(
} else if (j < start) {
// 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_occurence, last_char);
index += pattern_length - 1
- CharOccurrence(bad_char_occurence,
static_cast<SubjectChar>(last_char));
} else {
int gs_shift = good_suffix_shift[j + 1];
int bc_occ =
......@@ -432,7 +433,7 @@ int StringSearch<PatternChar, SubjectChar>::BoyerMooreHorspoolSearch(
// How bad we are doing without a good-suffix table.
PatternChar last_char = pattern[pattern_length - 1];
int last_char_shift = pattern_length - 1 -
CharOccurrence(char_occurrences, last_char);
CharOccurrence(char_occurrences, static_cast<SubjectChar>(last_char));
// Perform search
int index = start_index; // No matches found prior to this index.
while (index <= subject_length - pattern_length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment