aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/font.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-24 20:47:59 +0800
committerchai <chaifix@163.com>2018-08-24 20:47:59 +0800
commitb52aa211c801a0cc15ed09553e3ff1835662b60b (patch)
tree58eddcc673a88f2d1912267bf6d26cd3565b32f7 /src/lua/modules/graphics/font.cpp
parent106dfe48c40fdb24b7f5e8a84c992d15363a38d9 (diff)
*update
Diffstat (limited to 'src/lua/modules/graphics/font.cpp')
-rw-r--r--src/lua/modules/graphics/font.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lua/modules/graphics/font.cpp b/src/lua/modules/graphics/font.cpp
index 926f2cc..042eb19 100644
--- a/src/lua/modules/graphics/font.cpp
+++ b/src/lua/modules/graphics/font.cpp
@@ -10,6 +10,8 @@ namespace lua
using namespace jin::graphics;
+ typedef Ref<Font>& FontRef;
+
static int l_gc(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_FONT);
@@ -20,7 +22,7 @@ namespace lua
static int l_box(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_GRAPHICS_FONT, sizeof(Proxy));
- Ref<Font>& ref = proxy->getRef<Font>();
+ FontRef ref = proxy->getRef<Font>();
const char* text = luax_checkstring(L, 2);
int fheight = luax_checknumber(L, 3);
int spacing = luax_checknumber(L, 4);