From 351c5af8f64ff77f016df56645669f0e4378872e Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 29 Sep 2014 22:24:32 -0400 Subject: [PATCH] Fix implicit conversion warnings for getter. --- sol/stack.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 }; } };