diff options
Diffstat (limited to 'base/files/memory_mapped_file_unittest.cc')
-rw-r--r-- | base/files/memory_mapped_file_unittest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/files/memory_mapped_file_unittest.cc b/base/files/memory_mapped_file_unittest.cc index 1812d88..c865e27 100644 --- a/base/files/memory_mapped_file_unittest.cc +++ b/base/files/memory_mapped_file_unittest.cc @@ -14,16 +14,16 @@ namespace base { namespace { // Create a temporary buffer and fill it with a watermark sequence. -scoped_ptr<uint8[]> CreateTestBuffer(size_t size, size_t offset) { - scoped_ptr<uint8[]> buf(new uint8[size]); +scoped_ptr<uint8_t[]> CreateTestBuffer(size_t size, size_t offset) { + scoped_ptr<uint8_t[]> buf(new uint8_t[size]); for (size_t i = 0; i < size; ++i) - buf.get()[i] = static_cast<uint8>((offset + i) % 253); + buf.get()[i] = static_cast<uint8_t>((offset + i) % 253); return buf; } // Check that the watermark sequence is consistent with the |offset| provided. -bool CheckBufferContents(const uint8* data, size_t size, size_t offset) { - scoped_ptr<uint8[]> test_data(CreateTestBuffer(size, offset)); +bool CheckBufferContents(const uint8_t* data, size_t size, size_t offset) { + scoped_ptr<uint8_t[]> test_data(CreateTestBuffer(size, offset)); return memcmp(test_data.get(), data, size) == 0; } @@ -41,7 +41,7 @@ class MemoryMappedFileTest : public PlatformTest { File::FLAG_CREATE_ALWAYS | File::FLAG_READ | File::FLAG_WRITE); EXPECT_TRUE(file.IsValid()); - scoped_ptr<uint8[]> test_data(CreateTestBuffer(size, 0)); + scoped_ptr<uint8_t[]> test_data(CreateTestBuffer(size, 0)); size_t bytes_written = file.Write(0, reinterpret_cast<char*>(test_data.get()), size); EXPECT_EQ(size, bytes_written); |