From 7f7f6b3f19703eaeaad3801e47749e0173faa2fc Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 16 Aug 2018 14:27:08 +0800 Subject: *update --- src/lua/graphics/luaopen_Canvas.cpp | 3 +-- src/lua/luaopen_types.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') 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& checkCanvas(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_CANVAS); - Ref* ref = (Ref*)proxy->reference; - return *ref; + return proxy->getRef(); } 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 -- cgit v1.1-26-g67d0