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_texture.cpp | |
parent | d34e5c9d7c6135e805f2cc231411cdcc9910190c (diff) |
*去除shared template
Diffstat (limited to 'src/lua/modules/graphics/je_lua_texture.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_texture.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lua/modules/graphics/je_lua_texture.cpp b/src/lua/modules/graphics/je_lua_texture.cpp index 9d2d567..7bac237 100644 --- a/src/lua/modules/graphics/je_lua_texture.cpp +++ b/src/lua/modules/graphics/je_lua_texture.cpp @@ -12,31 +12,29 @@ namespace JinEngine const char* Jin_Lua_Texture = "Texture"; - typedef Shared<Texture>& SharedTexture; - - LUA_IMPLEMENT inline SharedTexture checkTexture(lua_State* L) + LUA_IMPLEMENT inline Texture* checkTexture(lua_State* L) { LuaObject* luaObj = (LuaObject*)luax_checktype(L, 1, Jin_Lua_Texture); - return luaObj->getShared<Texture>(); + return luaObj->getObject<Texture>(); } LUA_IMPLEMENT int l_getWidth(lua_State* L) { - SharedTexture shared = checkTexture(L); + Texture* shared = checkTexture(L); luax_pushnumber(L, shared->getWidth()); return 1; } LUA_IMPLEMENT int l_getHeight(lua_State *L) { - SharedTexture shared = checkTexture(L); + Texture* shared = checkTexture(L); luax_pushnumber(L, shared->getHeight()); return 1; } LUA_IMPLEMENT int l_getSize(lua_State* L) { - SharedTexture shared = checkTexture(L); + Texture* shared = checkTexture(L); luax_pushnumber(L, shared->getWidth()); luax_pushnumber(L, shared->getHeight()); return 2; |