aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-16 14:27:08 +0800
committerchai <chaifix@163.com>2018-08-16 14:27:08 +0800
commit7f7f6b3f19703eaeaad3801e47749e0173faa2fc (patch)
tree6b1da7ad1e89df560acdf8bdd41808ff6fdda00f /src
parent8585c92b7d0744a1f1a39c872cf5096621161b6c (diff)
*update
Diffstat (limited to 'src')
-rw-r--r--src/lua/graphics/luaopen_Canvas.cpp3
-rw-r--r--src/lua/luaopen_types.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/lua/graphics/luaopen_Canvas.cpp b/src/lua/graphics/luaopen_Canvas.cpp
index 7b694e9..d686a88 100644
--- a/src/lua/graphics/luaopen_Canvas.cpp
+++ b/src/lua/graphics/luaopen_Canvas.cpp
@@ -12,8 +12,7 @@ namespace lua
static inline Ref<Canvas>& checkCanvas(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_CANVAS);
- Ref<Canvas>* ref = (Ref<Canvas>*)proxy->reference;
- return *ref;
+ return proxy->getRef<Canvas>();
}
static int l_getWidth(lua_State* L)
diff --git a/src/lua/luaopen_types.h b/src/lua/luaopen_types.h
index b328d44..be59157 100644
--- a/src/lua/luaopen_types.h
+++ b/src/lua/luaopen_types.h
@@ -102,7 +102,7 @@ namespace lua
}
Reference* reference; // acctual object binded
- const char* type; // type name and metatable name
+ const char* type; // type name and metatable name
};
} // lua