Index: samplecode/SampleApp.cpp |
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp |
index c71fda5f9d991a578fcda314dacade1066635861..f9865dcfc0afb23fef3d8c3be27d046c3ffd6e3f 100644 |
--- a/samplecode/SampleApp.cpp |
+++ b/samplecode/SampleApp.cpp |
@@ -27,6 +27,7 @@ |
#include "SkPictureRecorder.h" |
#include "SkStream.h" |
#include "SkSurface.h" |
+#include "SkTemplates.h" |
#include "SkTSort.h" |
#include "SkTime.h" |
#include "SkTypeface.h" |
@@ -792,8 +793,8 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev |
SkFILEStream stream(FLAGS_sequence[0]); |
if (stream.isValid()) { |
size_t len = stream.getLength(); |
- SkAutoMalloc storage(len + 1); |
- char* buffer = (char*)storage.get(); |
+ SkAutoTMalloc<char> storage(len + 1); |
+ char* buffer = storage.get(); |
stream.read(buffer, len); |
buffer[len] = 0; |