aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_Font.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-16 14:21:56 +0800
committerchai <chaifix@163.com>2018-08-16 14:21:56 +0800
commit8585c92b7d0744a1f1a39c872cf5096621161b6c (patch)
tree6aa02138f39f7b11ab17c7399064353092b8df0c /src/lua/graphics/luaopen_Font.cpp
parentbe9b27dbf550093b555ab3087c11b38c89ab9fd0 (diff)
*update
Diffstat (limited to 'src/lua/graphics/luaopen_Font.cpp')
-rw-r--r--src/lua/graphics/luaopen_Font.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/graphics/luaopen_Font.cpp b/src/lua/graphics/luaopen_Font.cpp
index 8585d46..341af87 100644
--- a/src/lua/graphics/luaopen_Font.cpp
+++ b/src/lua/graphics/luaopen_Font.cpp
@@ -19,13 +19,13 @@ namespace lua
static int l_box(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_GRAPHICS_FONT, sizeof(Proxy));
- Font* font = (Font*)proxy->object;
+ Ref<Font>& ref = proxy->getRef<Font>();
const char* text = luax_checkstring(L, 2);
int fheight = luax_checknumber(L, 3);
int spacing = luax_checknumber(L, 4);
int lheight = luax_checknumber(L, 5);
int w, h;
- font->box(text, fheight, lheight, spacing, &w, &h);
+ (*ref).box(text, fheight, lheight, spacing, &w, &h);
luax_pushnumber(L, w);
luax_pushnumber(L, h);
return 2;