diff --git a/sol/stack.hpp b/sol/stack.hpp index 55c1cacc..c552aa55 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -92,12 +92,12 @@ template struct getter { template> = 0> static U get(lua_State* L, int index = -1) { - return lua_tonumber(L, index); + return static_cast(lua_tonumber(L, index)); } template, std::is_signed> = 0> static U get(lua_State* L, int index = -1) { - return lua_tounsigned(L, index); + return static_cast(lua_tounsigned(L, index)); } template, std::is_unsigned> = 0> @@ -146,7 +146,7 @@ struct getter { static std::string get(lua_State* L, int index = -1) { std::string::size_type len; auto str = lua_tolstring(L, index, &len); - return{ str, len }; + return { str, len }; } };