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

Unified Diff: src/runtime.cc

Issue 12864: Fix build problem in Win. (Closed)
Patch Set: Created 12 years 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 5512f8323a99e42769fff93167d07ce64693fec0..749bee087774d770f10f7dc92cde8ec03f785383 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1383,13 +1383,14 @@ int Runtime::StringMatch(Handle<String> sub,
}
Vector<const char> ascii_vector =
sub->ToAsciiVector().SubVector(start_index, subject_length);
- void* pos = memchr(ascii_vector.start(),
- static_cast<const char>(pchar),
- static_cast<size_t>(ascii_vector.length()));
+ const void* pos = memchr(ascii_vector.start(),
+ static_cast<const char>(pchar),
+ static_cast<size_t>(ascii_vector.length()));
if (pos == NULL) {
return -1;
}
- return reinterpret_cast<char*>(pos) - ascii_vector.start() + start_index;
+ return reinterpret_cast<const char*>(pos) - ascii_vector.start()
+ + start_index;
}
return SingleCharIndexOf(sub->ToUC16Vector(),
pat->Get(pat_shape, 0),
« 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