aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_ttf_data.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_ttf_data.cpp
parentd34e5c9d7c6135e805f2cc231411cdcc9910190c (diff)
*去除shared template
Diffstat (limited to 'src/lua/modules/graphics/je_lua_ttf_data.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_ttf_data.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_ttf_data.cpp b/src/lua/modules/graphics/je_lua_ttf_data.cpp
index 9f4437e..b10b993 100644
--- a/src/lua/modules/graphics/je_lua_ttf_data.cpp
+++ b/src/lua/modules/graphics/je_lua_ttf_data.cpp
@@ -19,12 +19,11 @@ namespace JinEngine
{
LuaObject* luaTTFData = (LuaObject*)luax_checktype(L, 1, Jin_Lua_TTFData);
int fontsize = luax_checkinteger(L, 2);
- Shared<TTFData>& shrFontData = luaTTFData->getShared<TTFData>();
- TTFData* fontData = shrFontData.getObject();
+ TTFData* fontData = luaTTFData->getObject<TTFData>();
TTF* font = fontData->createTTF(fontsize);
- Shared<TTF>* shrTTF = new Shared<TTF>(font, Jin_Lua_TTF);
+ Shared* shrTTF = new Shared(font, Jin_Lua_TTF);
LuaObject* luaTTF = luax_newinstance(L, Jin_Lua_TTF, shrTTF);
- luaTTF->setDependency((int)TTFDependency::DEP_TTFDATA, &shrFontData);
+ luaTTF->setDependency((int)TTFDependency::DEP_TTFDATA, luaTTFData->getShared());
return 1;
}