aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_ttf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/modules/graphics/je_lua_ttf.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_ttf.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lua/modules/graphics/je_lua_ttf.cpp b/src/lua/modules/graphics/je_lua_ttf.cpp
index 317670c..ad1872f 100644
--- a/src/lua/modules/graphics/je_lua_ttf.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf.cpp
@@ -26,7 +26,6 @@ namespace JinEngine
LUA_IMPLEMENT int l_typeset(lua_State* L)
{
LuaObject* luaTTF = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTF);
- Shared<TTF>& shrTTF = luaTTF->getShared<TTF>();
TTF* ttf = luaTTF->getObject<TTF>();
int lineheight = luax_optnumber(L, 3, ttf->getFontSize());
int spacing = luax_optnumber(L, 4, 0);
@@ -44,9 +43,9 @@ namespace JinEngine
Text* text = luaText->getObject<Text>();
page = ttf->typeset(*text, lineheight, spacing);
}
- Shared<Page>* refPage = new Shared<Page>(page, Jin_Lua_Page);
+ Shared* refPage = new Shared(page, Jin_Lua_Page);
LuaObject* luaPage = luax_newinstance(L, Jin_Lua_Page, refPage);
- luaPage->setDependency((int)PageDependency::DEP_TTF, &shrTTF);
+ luaPage->setDependency((int)PageDependency::DEP_TTF, luaTTF->getShared());
return 1;
}