Revision: 5552
Author: [email protected]
Date: Wed Sep 29 07:06:30 2010
Log: Add cast to make Win-64 compile without warnings. This is a commit of
http://codereview.chromium.org/3521002 for lrn.
http://code.google.com/p/v8/source/detail?r=5552
Modified:
/branches/bleeding_edge/src/string-search.h
=======================================
--- /branches/bleeding_edge/src/string-search.h Wed Sep 29 03:57:23 2010
+++ /branches/bleeding_edge/src/string-search.h Wed Sep 29 07:06:30 2010
@@ -334,8 +334,9 @@
} 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 @@
// 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) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev