aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_Canvas.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-17 00:15:05 +0800
committerchai <chaifix@163.com>2018-08-17 00:15:05 +0800
commit952748a86c4ddf1d7e47b358a64904c35bacd4aa (patch)
tree2b65d1021a5b62beac5ac6b229b43856eaec29e9 /src/lua/graphics/luaopen_Canvas.cpp
parent7f7f6b3f19703eaeaad3801e47749e0173faa2fc (diff)
*update
Diffstat (limited to 'src/lua/graphics/luaopen_Canvas.cpp')
-rw-r--r--src/lua/graphics/luaopen_Canvas.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lua/graphics/luaopen_Canvas.cpp b/src/lua/graphics/luaopen_Canvas.cpp
index d686a88..ca1270c 100644
--- a/src/lua/graphics/luaopen_Canvas.cpp
+++ b/src/lua/graphics/luaopen_Canvas.cpp
@@ -18,22 +18,22 @@ namespace lua
static int l_getWidth(lua_State* L)
{
Ref<Canvas>& ref = checkCanvas(L);
- luax_pushnumber(L, (*ref).getWidth());
+ luax_pushnumber(L, ref->getWidth());
return 1;
}
static int l_getHeight(lua_State* L)
{
Ref<Canvas>& ref = checkCanvas(L);
- luax_pushnumber(L, (*ref).getHeight());
+ luax_pushnumber(L, ref->getHeight());
return 1;
}
static int l_getSize(lua_State* L)
{
Ref<Canvas>& ref = checkCanvas(L);
- luax_pushnumber(L, (*ref).getWidth());
- luax_pushnumber(L, (*ref).getHeight());
+ luax_pushnumber(L, ref->getWidth());
+ luax_pushnumber(L, ref->getHeight());
return 2;
}
@@ -42,7 +42,7 @@ namespace lua
Ref<Canvas>& ref = checkCanvas(L);
int x = luax_checknumber(L, 1);
int y = luax_checknumber(L, 2);
- (*ref).setAnchor(x, y);
+ ref->setAnchor(x, y);
return 0;
}