From a2a002be0d18738bf5b05d98c4bd00e2c433e186 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Wed, 19 Dec 2012 13:57:51 +0000 Subject: [PATCH] Fix windows compile warnings. R=dcarney@chromium.org BUG= Review URL: https://chromiumcodereview.appspot.com/11636016 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/heap.cc b/src/heap.cc index 8f96f4bf89..b7f606a20b 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -3312,15 +3312,16 @@ MUST_USE_RESULT static inline MaybeObject* MakeOrFindTwoCharacterString( return symbol; // Now we know the length is 2, we might as well make use of that fact // when building the new string. - } else if ((c1 | c2) <= String::kMaxAsciiCharCodeU) { // We can do this + } else if (static_cast(c1 | c2) <= String::kMaxAsciiCharCodeU) { + // We can do this. ASSERT(IsPowerOf2(String::kMaxAsciiCharCodeU + 1)); // because of this. Object* result; { MaybeObject* maybe_result = heap->AllocateRawOneByteString(2); if (!maybe_result->ToObject(&result)) return maybe_result; } char* dest = SeqOneByteString::cast(result)->GetChars(); - dest[0] = c1; - dest[1] = c2; + dest[0] = static_cast(c1); + dest[1] = static_cast(c2); return result; } else { Object* result;