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

Unified Diff: tools/viewer/SKPSlide.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 | « 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 9419253f0c25a2aa4f0a238018e0790bb84c09c3..e24e1fdb048d35718b6cd32f3e497fd9dbf9e267 100644
--- a/tools/viewer/SKPSlide.cpp
+++ b/tools/viewer/SKPSlide.cpp
@@ -35,8 +35,8 @@ void SKPSlide::draw(SkCanvas* canvas) {
}
static sk_sp<SkPicture> read_picture(const char path[]) {
- SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
- if (stream.get() == nullptr) {
+ std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path);
+ if (!stream) {
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