diff options
author | chai <chaifix@163.com> | 2018-12-08 22:05:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-08 22:05:31 +0800 |
commit | a16ce94158c9cf22a19c0e73dfe2e992a8302af1 (patch) | |
tree | 52d80d950cd410ba82af909e18f77e3b11cd6eda /src/lua/modules/graphics/je_lua_ttf_data.cpp | |
parent | d34e5c9d7c6135e805f2cc231411cdcc9910190c (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.cpp | 7 |
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; } |