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

Unified Diff: tests/TextureCompressionTest.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 | « tests/CanvasTest.cpp ('k') | tests/Writer32Test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TextureCompressionTest.cpp
diff --git a/tests/TextureCompressionTest.cpp b/tests/TextureCompressionTest.cpp
index d2e6db209b6a6d3af1258dddd06190932ac3c7df..18afebeff2c39175724a0ee5c492448a17b2ffdb 100644
--- a/tests/TextureCompressionTest.cpp
+++ b/tests/TextureCompressionTest.cpp
@@ -9,6 +9,7 @@
#include "SkData.h"
#include "SkEndian.h"
#include "SkImageInfo.h"
+#include "SkTemplates.h"
#include "SkTextureCompressor.h"
#include "Test.h"
@@ -136,8 +137,8 @@ DEF_TEST(CompressCheckerboard, reporter) {
}
}
- SkAutoMalloc decompMemory(kWidth*kHeight);
- uint8_t* decompBuffer = reinterpret_cast<uint8_t*>(decompMemory.get());
+ SkAutoTMalloc<uint8_t> decompMemory(kWidth*kHeight);
+ uint8_t* decompBuffer = decompMemory.get();
REPORTER_ASSERT(reporter, decompBuffer);
if (nullptr == decompBuffer) {
return;
« no previous file with comments | « tests/CanvasTest.cpp ('k') | tests/Writer32Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698