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

Side by Side Diff: src/utils/SkLua.cpp

Issue 22875037: My clang now doesn't complain about !"foo". (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/utils/SkJSON.cpp ('k') | src/utils/SkPictureUtils.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 899
900 static const char* rrect_type(const SkRRect& rr) { 900 static const char* rrect_type(const SkRRect& rr) {
901 switch (rr.getType()) { 901 switch (rr.getType()) {
902 case SkRRect::kUnknown_Type: return "unknown"; 902 case SkRRect::kUnknown_Type: return "unknown";
903 case SkRRect::kEmpty_Type: return "empty"; 903 case SkRRect::kEmpty_Type: return "empty";
904 case SkRRect::kRect_Type: return "rect"; 904 case SkRRect::kRect_Type: return "rect";
905 case SkRRect::kOval_Type: return "oval"; 905 case SkRRect::kOval_Type: return "oval";
906 case SkRRect::kSimple_Type: return "simple"; 906 case SkRRect::kSimple_Type: return "simple";
907 case SkRRect::kComplex_Type: return "complex"; 907 case SkRRect::kComplex_Type: return "complex";
908 } 908 }
909 SkASSERT(!"never get here"); 909 SkDEBUGFAIL("never get here");
910 return ""; 910 return "";
911 } 911 }
912 912
913 static int lrrect_rect(lua_State* L) { 913 static int lrrect_rect(lua_State* L) {
914 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect()); 914 SkLua(L).pushRect(get_obj<SkRRect>(L, 1)->rect());
915 return 1; 915 return 1;
916 } 916 }
917 917
918 static int lrrect_type(lua_State* L) { 918 static int lrrect_type(lua_State* L) {
919 lua_pushstring(L, rrect_type(*get_obj<SkRRect>(L, 1))); 919 lua_pushstring(L, rrect_type(*get_obj<SkRRect>(L, 1)));
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 REG_CLASS(L, SkShader); 1120 REG_CLASS(L, SkShader);
1121 REG_CLASS(L, SkTypeface); 1121 REG_CLASS(L, SkTypeface);
1122 REG_CLASS(L, SkMatrix); 1122 REG_CLASS(L, SkMatrix);
1123 } 1123 }
1124 1124
1125 extern "C" int luaopen_skia(lua_State* L); 1125 extern "C" int luaopen_skia(lua_State* L);
1126 extern "C" int luaopen_skia(lua_State* L) { 1126 extern "C" int luaopen_skia(lua_State* L) {
1127 SkLua::Load(L); 1127 SkLua::Load(L);
1128 return 0; 1128 return 0;
1129 } 1129 }
OLDNEW
« no previous file with comments | « src/utils/SkJSON.cpp ('k') | src/utils/SkPictureUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698