From 45f801f740de6982f8b9fa306d7df9add6ed1971 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 25 Nov 2013 06:14:46 -0500 Subject: [PATCH] make pop compare to 0 instead of casting to bool --- sol/stack.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sol/stack.hpp b/sol/stack.hpp index 36e7a8ea..be7907bd 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -95,7 +95,7 @@ inline T pop(lua_State* L) { template<> inline bool pop(lua_State* L) { - auto result = lua_toboolean(L, -1); + bool result = lua_toboolean(L, -1) != 0; lua_pop(L, 1); return result; }