Third wave of Win64 warning cleanup
https://codereview.chromium.org/27487003/
git-svn-id: http://skia.googlecode.com/svn/trunk@11817 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 81fde73..cccde8a 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -415,7 +415,7 @@
reporter->reportFailed(str);
}
- size_t subW, subH;
+ int subW, subH;
// Set sizes to be height = 2 to force the last row of the
// source to be used, thus verifying correct operation if
// the bitmap is an extracted subset.
@@ -472,7 +472,7 @@
// To simplify verifying correctness of copies attach
// buf to a SkBitmap, but copies are done using the
// raw buffer pointer.
- const uint32_t bufSize = subH *
+ const size_t bufSize = subH *
SkBitmap::ComputeRowBytes(src.getConfig(), subW) * 2;
SkAutoMalloc autoBuf (bufSize);
uint8_t* buf = static_cast<uint8_t*>(autoBuf.get());
@@ -482,8 +482,8 @@
// Set up values for each pixel being copied.
Coordinates coords(subW * subH);
- for (size_t x = 0; x < subW; ++x)
- for (size_t y = 0; y < subH; ++y)
+ for (int x = 0; x < subW; ++x)
+ for (int y = 0; y < subH; ++y)
{
int index = y * subW + x;
SkASSERT(index < coords.length);
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index a42112d..c7ddcbc 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -191,7 +191,7 @@
SkAutoDataUnref data(SkPictureUtils::GatherPixelRefs(pic, r));
REPORTER_ASSERT(reporter, data);
if (data) {
- int count = data->size() / sizeof(SkPixelRef*);
+ int count = static_cast<int>(data->size() / sizeof(SkPixelRef*));
REPORTER_ASSERT(reporter, 1 == count);
REPORTER_ASSERT(reporter, *(SkPixelRef**)data->data() == refs[i]);
}
@@ -209,7 +209,7 @@
SkData* data = SkPictureUtils::GatherPixelRefs(pic, r);
size_t dataSize = data ? data->size() : 0;
- int gatherCount = dataSize / sizeof(SkPixelRef*);
+ int gatherCount = static_cast<int>(dataSize / sizeof(SkPixelRef*));
SkASSERT(gatherCount * sizeof(SkPixelRef*) == dataSize);
SkPixelRef** gatherRefs = data ? (SkPixelRef**)(data->data()) : NULL;
SkAutoDataUnref adu(data);