diff options
Diffstat (limited to 'src/lua/graphics/luaopen_Image.cpp')
-rw-r--r-- | src/lua/graphics/luaopen_Image.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lua/graphics/luaopen_Image.cpp b/src/lua/graphics/luaopen_Image.cpp index b1672d5..47cb4c6 100644 --- a/src/lua/graphics/luaopen_Image.cpp +++ b/src/lua/graphics/luaopen_Image.cpp @@ -20,14 +20,14 @@ namespace lua static int l_getWidth(lua_State* L) { Ref<Image>& ref = checkImage(L); - luax_pushnumber(L, (*ref).getWidth()); + luax_pushnumber(L, ref->getWidth()); return 1; } static int l_getHeight(lua_State *L) { Ref<Image>& ref = checkImage(L); - luax_pushnumber(L, (*ref).getHeight()); + luax_pushnumber(L, ref->getHeight()); return 1; } @@ -36,7 +36,7 @@ namespace lua Ref<Image>& ref = checkImage(L); int x = luax_checknumber(L, 2); int y = luax_checknumber(L, 3); - color c = (*ref).getPixel(x, y); + color c = ref->getPixel(x, y); luax_pushnumber(L, c.rgba.r); luax_pushnumber(L, c.rgba.g); luax_pushnumber(L, c.rgba.b); @@ -49,15 +49,15 @@ namespace lua Ref<Image>& ref = checkImage(L); int x = luax_checknumber(L, 2); int y = luax_checknumber(L, 3); - (*ref).setAnchor(x, y); + ref->setAnchor(x, y); return 0; } static int l_getSize(lua_State* L) { Ref<Image>& ref = checkImage(L); - luax_pushnumber(L, (*ref).getWidth()); - luax_pushnumber(L, (*ref).getHeight()); + luax_pushnumber(L, ref->getWidth()); + luax_pushnumber(L, ref->getHeight()); return 2; } |