Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1121)

Unified Diff: src/runtime.cc

Issue 1109001: Fix windows build again: one more memchr call. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 1ad5004532127b8b3e795d6fd68182ad397ba9ea..713ddc8d313550c0a4e25805aa9f72bd83875bed 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698