diff options
author | chai <chaifix@163.com> | 2018-11-10 20:13:55 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-10 20:13:55 +0800 |
commit | e92caa97329016d012b46b9d37e1b2c3b613a8f2 (patch) | |
tree | 5bef0b7547e12f61dede5e09843e1718b808f9c4 /src/lua/modules/graphics/je_lua_bitmap.cpp | |
parent | 63153bc8e742c522cfd3f5ab10609966e33310e6 (diff) |
*修改代码结构
Diffstat (limited to 'src/lua/modules/graphics/je_lua_bitmap.cpp')
-rw-r--r-- | src/lua/modules/graphics/je_lua_bitmap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/modules/graphics/je_lua_bitmap.cpp b/src/lua/modules/graphics/je_lua_bitmap.cpp index a8d5bc0..8d4897b 100644 --- a/src/lua/modules/graphics/je_lua_bitmap.cpp +++ b/src/lua/modules/graphics/je_lua_bitmap.cpp @@ -10,12 +10,12 @@ namespace JinEngine namespace Lua { - typedef Ref<Bitmap>& BitmapRef; + typedef Shared<Bitmap>& BitmapRef; LUA_IMPLEMENT inline BitmapRef checkBitmap(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_BITMAP); - return proxy->getRef<Bitmap>(); + return proxy->getShared<Bitmap>(); } LUA_IMPLEMENT int l_gc(lua_State* L) @@ -88,7 +88,7 @@ namespace JinEngine Bitmap* bitmap = ref.getObject(); Bitmap* b = Bitmap::clone(bitmap); Proxy* proxy = (Proxy*)luax_newinstance(L, JIN_GRAPHICS_BITMAP, sizeof(Proxy)); - proxy->bind(new Ref<Bitmap>(b, JIN_GRAPHICS_BITMAP)); + proxy->bind(new Shared<Bitmap>(b, JIN_GRAPHICS_BITMAP)); return 1; } |