aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_Font.cpp
diff options
context:
space:
mode:
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;