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

Unified Diff: src/animator/SkAnimateMaker.cpp

Issue 2339273002: SkFontData to use smart pointers. (Closed)
Patch Set: Add trivial bodies to the trivial implementations. Created 4 years, 3 months 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 | « samplecode/SampleAnimator.cpp ('k') | src/animator/SkAnimator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkAnimateMaker.cpp
diff --git a/src/animator/SkAnimateMaker.cpp b/src/animator/SkAnimateMaker.cpp
index 5186da04d814ef4c2c876589385611c8efc066a9..066f877a9b50e9dcce864a3b5e6a302dfc2b92bf 100644
--- a/src/animator/SkAnimateMaker.cpp
+++ b/src/animator/SkAnimateMaker.cpp
@@ -99,9 +99,9 @@ bool SkAnimateMaker::decodeURI(const char uri[]) {
// SkDebugf("animator decode %s\n", uri);
// SkStream* stream = SkStream::GetURIStream(fPrefix.c_str(), uri);
- SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(uri));
- if (stream.get()) {
- bool success = decodeStream(stream);
+ std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(uri);
+ if (stream) {
+ bool success = decodeStream(stream.get());
if (hasError() && fError.hasNoun() == false)
fError.setNoun(uri);
return success;
« no previous file with comments | « samplecode/SampleAnimator.cpp ('k') | src/animator/SkAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698