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

Unified Diff: tools/lua/lua_pictures.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/get_images_from_skps.cpp ('k') | tools/viewer/SKPSlide.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/lua_pictures.cpp
diff --git a/tools/lua/lua_pictures.cpp b/tools/lua/lua_pictures.cpp
index eee7088f0d14dc97b012cf0b736e1a37483ab775..58983f4d58f56d9f7f2d6f861bc21918c10d1095 100644
--- a/tools/lua/lua_pictures.cpp
+++ b/tools/lua/lua_pictures.cpp
@@ -39,8 +39,8 @@ DEFINE_string2(tailFunc, s, "", "Optional lua function to call at end");
DEFINE_bool2(quiet, q, false, "Silence all non-error related output");
static sk_sp<SkPicture> load_picture(const char path[]) {
- SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
- if (stream.get()) {
+ std::unique_ptr<SkStream> stream = SkStream::MakeFromFile(path);
+ if (stream) {
return SkPicture::MakeFromStream(stream.get());
}
return nullptr;
« no previous file with comments | « tools/get_images_from_skps.cpp ('k') | tools/viewer/SKPSlide.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698