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

Unified Diff: src/svg/parser/SkSVG.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_libwebp.cpp ('k') | tests/ARGBImageEncoderTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/svg/parser/SkSVG.cpp
diff --git a/src/svg/parser/SkSVG.cpp b/src/svg/parser/SkSVG.cpp
index fdfc13a6d5ba17f038d3d1fc0d2cabde91dc0945..8ee7d0286a817695565eb99a20f49d53b7fb0643 100644
--- a/src/svg/parser/SkSVG.cpp
+++ b/src/svg/parser/SkSVG.cpp
@@ -8,7 +8,8 @@
#include "SkSVG.h"
-#include 'SkSVGParser.h"
+#include "SkSVGParser.h"
+#include "SkTemplates.h"
SkSVG::SkSVG() {
}
@@ -19,8 +20,8 @@ SkSVG::~SkSVG() {
bool SkSVG::decodeStream(SkStream* stream);
{
size_t size = stream->read(nil, 0);
- SkAutoMalloc storage(size);
- char* data = (char*)storage.get();
+ SkAutoTMalloc<char> storage(size);
+ char* data = storage.get();
size_t actual = stream->read(data, size);
SkASSERT(size == actual);
SkSVGParser parser(*fMaker);
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | tests/ARGBImageEncoderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698