Make second argument to setDefaultImageFilter Image:setFilter and Image:setWrap optional, and default to the first

This commit is contained in:
Bart van Strien
2012-11-18 19:18:37 +01:00
parent 3a47bafd41
commit d24c0344c8
2 changed files with 3 additions and 3 deletions
@@ -589,7 +589,7 @@ int w_setDefaultImageFilter(lua_State *L)
Image::FilterMode min;
Image::FilterMode mag;
const char *minstr = luaL_checkstring(L, 1);
const char *magstr = luaL_checkstring(L, 2);
const char *magstr = luaL_optstring(L, 2, minstr);
if (!Image::getConstant(minstr, min))
return luaL_error(L, "Invalid filter mode: %s", minstr);
if (!Image::getConstant(magstr, mag))