diff options
author | Ben Wagner <bungeman@google.com> | 2016-11-02 17:07:33 -0400 |
---|---|---|
committer | Ben Wagner <bungeman@google.com> | 2016-11-02 21:30:38 +0000 |
commit | 7ecc59610de72043e9b7ebaf1ef45c43425e54fc (patch) | |
tree | 25bdd613cc4096d02218308b6648e458737292a9 /src/codec/SkBmpCodec.cpp | |
parent | d5def99232f0c66de8da213fff09fa4bcaa9df4d (diff) |
Remove SkAutoTDeleteArray
This class is already just an alias for std::unique_ptr<T[]>, so replace
all uses with that and delete the class.
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot,Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN-Trybot
Change-Id: I40668d398356a22da071ee791666c7f728b59266
Reviewed-on: https://skia-review.googlesource.com/4362
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/codec/SkBmpCodec.cpp')
-rw-r--r-- | src/codec/SkBmpCodec.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp index 18e2be4009..b0ef8ad1d8 100644 --- a/src/codec/SkBmpCodec.cpp +++ b/src/codec/SkBmpCodec.cpp @@ -111,7 +111,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) { // Bmps embedded in Icos skip the first Bmp header if (!inIco) { // Read the first header and the size of the second header - SkAutoTDeleteArray<uint8_t> hBuffer(new uint8_t[kBmpHeaderBytesPlusFour]); + std::unique_ptr<uint8_t[]> hBuffer(new uint8_t[kBmpHeaderBytesPlusFour]); if (stream->read(hBuffer.get(), kBmpHeaderBytesPlusFour) != kBmpHeaderBytesPlusFour) { SkCodecPrintf("Error: unable to read first bitmap header.\n"); @@ -145,7 +145,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) { offset = 0; // Read the size of the second header - SkAutoTDeleteArray<uint8_t> hBuffer(new uint8_t[4]); + std::unique_ptr<uint8_t[]> hBuffer(new uint8_t[4]); if (stream->read(hBuffer.get(), 4) != 4) { SkCodecPrintf("Error: unable to read size of second bitmap header.\n"); return false; @@ -161,7 +161,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) { const uint32_t infoBytesRemaining = infoBytes - 4; // Read the second header - SkAutoTDeleteArray<uint8_t> iBuffer(new uint8_t[infoBytesRemaining]); + std::unique_ptr<uint8_t[]> iBuffer(new uint8_t[infoBytesRemaining]); if (stream->read(iBuffer.get(), infoBytesRemaining) != infoBytesRemaining) { SkCodecPrintf("Error: unable to read second bitmap header.\n"); return false; @@ -320,7 +320,7 @@ bool SkBmpCodec::ReadHeader(SkStream* stream, bool inIco, SkCodec** codecOut) { switch (headerType) { case kInfoV1_BmpHeaderType: { // The V1 header stores the bit masks after the header - SkAutoTDeleteArray<uint8_t> mBuffer(new uint8_t[kBmpMaskBytes]); + std::unique_ptr<uint8_t[]> mBuffer(new uint8_t[kBmpMaskBytes]); if (stream->read(mBuffer.get(), kBmpMaskBytes) != kBmpMaskBytes) { SkCodecPrintf("Error: unable to read bit inputMasks.\n"); |