aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_texture_font.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-12-08 22:05:31 +0800
committerchai <chaifix@163.com>2018-12-08 22:05:31 +0800
commita16ce94158c9cf22a19c0e73dfe2e992a8302af1 (patch)
tree52d80d950cd410ba82af909e18f77e3b11cd6eda /src/lua/modules/graphics/je_lua_texture_font.cpp
parentd34e5c9d7c6135e805f2cc231411cdcc9910190c (diff)
*去除shared template
Diffstat (limited to 'src/lua/modules/graphics/je_lua_texture_font.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_texture_font.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lua/modules/graphics/je_lua_texture_font.cpp b/src/lua/modules/graphics/je_lua_texture_font.cpp
index 8a3eca0..1365aa8 100644
--- a/src/lua/modules/graphics/je_lua_texture_font.cpp
+++ b/src/lua/modules/graphics/je_lua_texture_font.cpp
@@ -26,7 +26,6 @@ namespace JinEngine
LUA_IMPLEMENT int l_typeset(lua_State* L)
{
LuaObject* luaTexFont = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TextureFont);
- Shared<TextureFont>& shrTexFont = luaTexFont->getShared<TextureFont>();
TextureFont* tf = luaTexFont->getObject<TextureFont>();
int lineheight = luax_checkinteger(L, 3);
int spacing = luax_optnumber(L, 4, 0);
@@ -44,9 +43,9 @@ namespace JinEngine
Text* text = p2->getObject<Text>();
page = tf->typeset(*text, lineheight, spacing);
}
- Shared<Page>* shrPage = new Shared<Page>(page, Jin_Lua_Page);
+ Shared* shrPage = new Shared(page, Jin_Lua_Page);
LuaObject* luaPage = luax_newinstance(L, Jin_Lua_Page, shrPage);
- luaPage->setDependency((int)PageDependency::DEP_TEXTURE_FONT, &shrTexFont);
+ luaPage->setDependency((int)PageDependency::DEP_TEXTURE_FONT, luaTexFont->getShared());
return 1;
}