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

Unified Diff: src/api.cc

Issue 11746015: Fix Win64 build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 12 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/api.cc
diff --git a/src/api.cc b/src/api.cc
index 22901107fe284d99cfeee2e78062b445a875dec7..b926c222a5777f911d022d7f242af8033bb632a3 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<int>(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<int>(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<int>(buffer_ - start_);
}
private:
« 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