Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(635)

Unified Diff: src/images/SkImageDecoder_libwebp.cpp

Issue 1516833003: Switch SkAutoMalloc to SkAutoTMalloc to avoid cast (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Go back to patch set 3 Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkImageDecoder_libpng.cpp ('k') | src/svg/parser/SkSVG.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libwebp.cpp
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp
index 07ff83de9bb10c3af344cede1cb0ab5d59315d35..52535779fa0b60eafd83939ec12ba725f873678f 100644
--- a/src/images/SkImageDecoder_libwebp.cpp
+++ b/src/images/SkImageDecoder_libwebp.cpp
@@ -201,8 +201,8 @@ static bool webp_idecode(SkStream* stream, WebPDecoderConfig* config) {
}
const size_t readBufferSize = stream->hasLength() ?
SkTMin(stream->getLength(), WEBP_IDECODE_BUFFER_SZ) : WEBP_IDECODE_BUFFER_SZ;
- SkAutoMalloc srcStorage(readBufferSize);
- unsigned char* input = (uint8_t*)srcStorage.get();
+ SkAutoTMalloc<unsigned char> srcStorage(readBufferSize);
+ unsigned char* input = srcStorage.get();
if (nullptr == input) {
WebPIDelete(idec);
WebPFreeDecBuffer(&config->output);
« no previous file with comments | « src/images/SkImageDecoder_libpng.cpp ('k') | src/svg/parser/SkSVG.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698