From: yangguo@chromium.org Date: Thu, 3 Jan 2013 13:16:00 +0000 (+0000) Subject: Fix Win64 build. X-Git-Tag: upstream/4.7.83~15360 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffa936927be0fdbd6c7bb462c9449013cb4a5121;p=platform%2Fupstream%2Fv8.git Fix Win64 build. R=dcarney@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/11746015 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/api.cc b/src/api.cc index 22901107f..b926c222a 100644 --- a/src/api.cc +++ b/src/api.cc @@ -4012,7 +4012,7 @@ class Utf8WriterVisitor { if (capacity_ == -1) { fast_length = length; } else { - int remaining_capacity = capacity_ - (buffer - start_); + int remaining_capacity = capacity_ - static_cast(buffer - start_); // Need enough space to write everything but one character. STATIC_ASSERT(Utf16::kMaxExtraUtf8BytesForOneUtf16CodeUnit == 3); int writable_length = (remaining_capacity - 3)/3; @@ -4039,7 +4039,7 @@ class Utf8WriterVisitor { } ASSERT(capacity_ != -1); // Slow loop. Must check capacity on each iteration. - int remaining_capacity = capacity_ - (buffer - start_); + int remaining_capacity = capacity_ - static_cast(buffer - start_); ASSERT(remaining_capacity >= 0); for (; i < length && remaining_capacity > 0; i++) { uint16_t character = *chars++; @@ -4084,7 +4084,7 @@ class Utf8WriterVisitor { (capacity_ == -1 || (buffer_ - start_) < capacity_)) { *buffer_++ = '\0'; } - return buffer_ - start_; + return static_cast(buffer_ - start_); } private: