make pop<bool> compare to 0 instead of casting to bool

This commit is contained in:
Rapptz 2013-11-25 06:14:46 -05:00
parent 1c423da153
commit 45f801f740

View File

@ -95,7 +95,7 @@ inline T pop(lua_State* L) {
template<> template<>
inline bool pop<bool>(lua_State* L) { inline bool pop<bool>(lua_State* L) {
auto result = lua_toboolean(L, -1); bool result = lua_toboolean(L, -1) != 0;
lua_pop(L, 1); lua_pop(L, 1);
return result; return result;
} }