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

Side by Side Diff: tools/lua/lua_app.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 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 unified diff | Download patch
« no previous file with comments | « tools/image_expectations.cpp ('k') | tools/lua/lua_pictures.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkLua.h" 8 #include "SkLua.h"
9 #include "SkGraphics.h" 9 #include "SkGraphics.h"
10 #include "SkStream.h" 10 #include "SkStream.h"
(...skipping 15 matching lines...) Expand all
26 } 26 }
27 return data; 27 return data;
28 } 28 }
29 29
30 int tool_main(int argc, char** argv); 30 int tool_main(int argc, char** argv);
31 int tool_main(int argc, char** argv) { 31 int tool_main(int argc, char** argv) {
32 SkAutoGraphics ag; 32 SkAutoGraphics ag;
33 SkLua L; 33 SkLua L;
34 34
35 for (int i = 1; i < argc; ++i) { 35 for (int i = 1; i < argc; ++i) {
36 SkData* data = NULL; 36 SkData* data = nullptr;
37 const void* ptr; 37 const void* ptr;
38 size_t len; 38 size_t len;
39 39
40 if (!strcmp(argv[i], "--lua") && i < argc-1) { 40 if (!strcmp(argv[i], "--lua") && i < argc-1) {
41 ptr = argv[i + 1]; 41 ptr = argv[i + 1];
42 len = strlen(argv[i + 1]); 42 len = strlen(argv[i + 1]);
43 i += 1; 43 i += 1;
44 } else { 44 } else {
45 data = read_into_data(argv[i]); 45 data = read_into_data(argv[i]);
46 ptr = data->data(); 46 ptr = data->data();
47 len = data->size(); 47 len = data->size();
48 } 48 }
49 if (!L.runCode(ptr, len)) { 49 if (!L.runCode(ptr, len)) {
50 SkDebugf("failed to load %s\n", argv[i]); 50 SkDebugf("failed to load %s\n", argv[i]);
51 exit(-1); 51 exit(-1);
52 } 52 }
53 SkSafeUnref(data); 53 SkSafeUnref(data);
54 } 54 }
55 return 0; 55 return 0;
56 } 56 }
57 57
58 #if !defined SK_BUILD_FOR_IOS 58 #if !defined SK_BUILD_FOR_IOS
59 int main(int argc, char * const argv[]) { 59 int main(int argc, char * const argv[]) {
60 return tool_main(argc, (char**) argv); 60 return tool_main(argc, (char**) argv);
61 } 61 }
62 #endif 62 #endif
OLDNEW
« no previous file with comments | « tools/image_expectations.cpp ('k') | tools/lua/lua_pictures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698