diff options
author | chai <chaifix@163.com> | 2018-05-29 12:39:52 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-05-29 12:39:52 +0800 |
commit | e024e5a23c4f5c8e8fb02e7b03c8e9265ac6c1ef (patch) | |
tree | a19511ccb880db2f7dd99778efc956435474a518 /src/lua/graphics/luaopen_graphics.cpp | |
parent | 2add73bb54ce9376ffcd44ffd929049d3c430628 (diff) |
Image改为工厂
Diffstat (limited to 'src/lua/graphics/luaopen_graphics.cpp')
-rw-r--r-- | src/lua/graphics/luaopen_graphics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp index 2b6031b..0d06aca 100644 --- a/src/lua/graphics/luaopen_graphics.cpp +++ b/src/lua/graphics/luaopen_graphics.cpp @@ -71,7 +71,7 @@ namespace lua fs->read(f, &b); Proxy* proxy = (Proxy*)luax_newinstance(L, TYPE_IMAGE, sizeof(Proxy)); - Image* img = new Image((const char*)b.data, b.size); + Image* img = Image::createImage(b.data, b.size); proxy->bind(img); return 1; } |