Revision: 12764
Author: [email protected]
Date: Thu Oct 18 08:57:45 2012
Log: Static cast char* diff to int.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11200004
http://code.google.com/p/v8/source/detail?r=12764
Modified:
/branches/bleeding_edge/src/objects.h
=======================================
--- /branches/bleeding_edge/src/objects.h Thu Oct 18 08:08:11 2012
+++ /branches/bleeding_edge/src/objects.h Thu Oct 18 08:57:45 2012
@@ -7424,18 +7424,18 @@
const uintptr_t non_ascii_mask = kUintptrAllBitsSet / 0xFF * 0x80;
while (chars + sizeof(uintptr_t) <= limit) {
if (*reinterpret_cast<const uintptr_t*>(chars) & non_ascii_mask) {
- return chars - start;
+ return static_cast<int>(chars - start);
}
chars += sizeof(uintptr_t);
}
#endif
while (chars < limit) {
if (static_cast<uint8_t>(*chars) > kMaxAsciiCharCodeU) {
- return chars - start;
+ return static_cast<int>(chars - start);
}
++chars;
}
- return chars - start;
+ return static_cast<int>(chars - start);
}
static inline bool IsAscii(const char* chars, int length) {
@@ -7446,10 +7446,10 @@
const uc16* limit = chars + length;
const uc16* start = chars;
while (chars < limit) {
- if (*chars > kMaxAsciiCharCodeU) return chars - start;
+ if (*chars > kMaxAsciiCharCodeU) return static_cast<int>(chars -
start);
++chars;
}
- return chars - start;
+ return static_cast<int>(chars - start);
}
static inline bool IsAscii(const uc16* chars, int length) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev