| Index: tests/Writer32Test.cpp
|
| diff --git a/tests/Writer32Test.cpp b/tests/Writer32Test.cpp
|
| index 5849d731efba39ed0e83c82d22ef6a3e8f00ae0c..3fcb64424e5c49b34a852aa4a2783bfd1ee6fdb3 100644
|
| --- a/tests/Writer32Test.cpp
|
| +++ b/tests/Writer32Test.cpp
|
| @@ -144,16 +144,13 @@ static void test2(skiatest::Reporter* reporter, SkWriter32* writer) {
|
|
|
| static void testWritePad(skiatest::Reporter* reporter, SkWriter32* writer) {
|
| // Create some random data to write.
|
| - const size_t dataSize = 10<<2;
|
| - SkASSERT(SkIsAlign4(dataSize));
|
| + const size_t dataSize = 10;
|
|
|
| - SkAutoMalloc originalData(dataSize);
|
| + SkAutoTMalloc<uint32_t> originalData(dataSize);
|
| {
|
| SkRandom rand(0);
|
| - uint32_t* ptr = static_cast<uint32_t*>(originalData.get());
|
| - uint32_t* stop = ptr + (dataSize>>2);
|
| - while (ptr < stop) {
|
| - *ptr++ = rand.nextU();
|
| + for (size_t i = 0; i < dataSize; i++) {
|
| + originalData[i] = rand.nextU();
|
| }
|
|
|
| // Write the random data to the writer at different lengths for
|
|
|