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

Unified Diff: tools/viewer/SKPSlide.cpp

Issue 2343933002: Revert of SkFontData to use smart pointers. (Closed)
Patch Set: 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 | « tools/lua/lua_pictures.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/SKPSlide.cpp
diff --git a/tools/viewer/SKPSlide.cpp b/tools/viewer/SKPSlide.cpp
index e24e1fdb048d35718b6cd32f3e497fd9dbf9e267..9419253f0c25a2aa4f0a238018e0790bb84c09c3 100644
--- a/tools/viewer/SKPSlide.cpp
+++ b/tools/viewer/SKPSlide.cpp
@@ -35,8 +35,8 @@
}
static sk_sp<SkPicture> read_picture(const char path[]) {
- std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path);
- if (!stream) {
+ SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
+ if (stream.get() == nullptr) {
SkDebugf("Could not read %s.\n", path);
return nullptr;
}
« no previous file with comments | « tools/lua/lua_pictures.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698