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:
parent
c3972d21fb
commit
494ba3a4c8
@ -2446,9 +2446,10 @@ static int SimpleIndexOf(Vector<const schar> subject,
|
||||
pchar pattern_first_char = pattern[0];
|
||||
for (int i = idx, n = subject.length() - pattern.length(); i <= n; i++) {
|
||||
if (sizeof(schar) == 1 && sizeof(pchar) == 1) {
|
||||
schar* pos = reinterpret_cast<schar*>(memchr(subject.start() + i,
|
||||
pattern_first_char,
|
||||
n - i + 1));
|
||||
const schar* pos = reinterpret_cast<const schar*>(
|
||||
memchr(subject.start() + i,
|
||||
pattern_first_char,
|
||||
n - i + 1));
|
||||
if (pos == NULL) return -1;
|
||||
i = pos - subject.start();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user