Fix windows build.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 11 Dec 2012 10:42:10 +0000 (10:42 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 11 Dec 2012 10:42:10 +0000 (10:42 +0000)
R=dcarney@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com/11538003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/test-strings.cc

index ceadcef..26b7339 100644 (file)
@@ -40,7 +40,7 @@ class RandomNumberGenerator {
     i = (i + 1) & (kQSize-1);
     uint64_t t = a * Q[i] + c;
     c = (t >> 32);
-    uint32_t x = t + c;
+    uint32_t x = static_cast<uint32_t>(t + c);
     if (x < c) {
       x++;
       c++;
@@ -635,7 +635,7 @@ static void VerifyCharacterStream(
   // Iterate start search in multiple places in the string.
   int outer_iterations = length > 20 ? 20 : length;
   for (int j = 0; j <= outer_iterations; j++) {
-    int offset = static_cast<double>(length)*j/outer_iterations;
+    int offset = length * j / outer_iterations;
     if (offset < 0) offset = 0;
     // Want to test the offset == length case.
     if (offset > length) offset = length;