Fix windows build again: one more memchr call.

Review URL: http://codereview.chromium.org/1109001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vitalyr@chromium.org 2010-03-18 09:38:30 +00:00
parent c3972d21fb
commit 494ba3a4c8

View File

@ -2446,9 +2446,10 @@ static int SimpleIndexOf(Vector<const schar> subject,
pchar pattern_first_char = pattern[0]; pchar pattern_first_char = pattern[0];
for (int i = idx, n = subject.length() - pattern.length(); i <= n; i++) { for (int i = idx, n = subject.length() - pattern.length(); i <= n; i++) {
if (sizeof(schar) == 1 && sizeof(pchar) == 1) { if (sizeof(schar) == 1 && sizeof(pchar) == 1) {
schar* pos = reinterpret_cast<schar*>(memchr(subject.start() + i, const schar* pos = reinterpret_cast<const schar*>(
pattern_first_char, memchr(subject.start() + i,
n - i + 1)); pattern_first_char,
n - i + 1));
if (pos == NULL) return -1; if (pos == NULL) return -1;
i = pos - subject.start(); i = pos - subject.start();
} else { } else {