mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
clear array initialization
This commit is contained in:
parent
466259a985
commit
1d1c4b9579
|
@ -214,8 +214,7 @@ void TestWriting(const char* mode, int tiled, int height) {
|
|||
for (int i = 0; i < (height + 15) / 16; ++i) {
|
||||
std::array<uint8_t, kTileBufferSize> tilebuffer;
|
||||
tilebuffer.fill(i);
|
||||
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(),
|
||||
kTileBufferSize);
|
||||
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(), tilebuffer.size());
|
||||
|
||||
status_or_int = api.TIFFWriteEncodedTile(&tif, i, tilebuffer_.PtrBoth(),
|
||||
kTileBufferSize);
|
||||
|
@ -255,8 +254,8 @@ void TestWriting(const char* mode, int tiled, int height) {
|
|||
uint8_t expected_c = static_cast<uint8_t>(i);
|
||||
tilebuffer.fill(0);
|
||||
|
||||
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(),
|
||||
kTileBufferSize);
|
||||
sapi::v::Array<uint8_t> tilebuffer_(tilebuffer.data(), tilebuffer.size());
|
||||
|
||||
status_or_long = api.TIFFReadEncodedTile(
|
||||
&tif2, i, tilebuffer_.PtrBoth(), kTileBufferSize);
|
||||
ASSERT_THAT(status_or_long, IsOk())
|
||||
|
|
|
@ -51,7 +51,7 @@ TEST(SandboxTest, LongTag) {
|
|||
ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API";
|
||||
|
||||
std::array<uint8_t, kSamplePerPixel> buffer = {0, 127, 255};
|
||||
sapi::v::Array<uint8_t> buffer_(buffer.data(), kSamplePerPixel);
|
||||
sapi::v::Array<uint8_t> buffer_(buffer.data(), buffer.size());
|
||||
|
||||
absl::StatusOr<int> status_or_int;
|
||||
absl::StatusOr<TIFF*> status_or_tif;
|
||||
|
|
|
@ -72,7 +72,7 @@ TEST(SandboxTest, ShortTag) {
|
|||
ASSERT_THAT(sandbox.Init(), IsOk()) << "Couldn't initialize Sandboxed API";
|
||||
|
||||
std::array<uint8_t, kSamplePerPixel> buffer = {0, 127, 255};
|
||||
sapi::v::Array<uint8_t> buffer_(buffer.data(), kSamplePerPixel);
|
||||
sapi::v::Array<uint8_t> buffer_(buffer.data(), buffer.size());
|
||||
|
||||
absl::StatusOr<int> status_or_int;
|
||||
absl::StatusOr<TIFF*> status_or_tif;
|
||||
|
|
Loading…
Reference in New Issue
Block a user