diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lua/graphics/luaopen_Canvas.cpp | 3 | ||||
-rw-r--r-- | src/lua/luaopen_types.h | 2 |
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 |