From 624b8be46f38a695f6f9e4c7ea07cd8f370c04b4 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 5 Dec 2017 21:12:45 -0800 Subject: Updated cmake files; fixed build warnings --- RenderScript/src/LuaBindings.cpp | 5 +++-- RenderScript/src/ScriptParser.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'RenderScript/src') diff --git a/RenderScript/src/LuaBindings.cpp b/RenderScript/src/LuaBindings.cpp index 9b6fe87..425acbb 100644 --- a/RenderScript/src/LuaBindings.cpp +++ b/RenderScript/src/LuaBindings.cpp @@ -30,7 +30,7 @@ using namespace std; namespace Diligent { template - int ReadIntValueFromLua( lua_State *L, int Index ) + Type ReadIntValueFromLua( lua_State *L, int Index ) { CheckType( L, Index, LUA_TNUMBER ); @@ -114,7 +114,8 @@ namespace Diligent return ReadIntValueFromLua( L, Index ); } - template<>Uint8 ReadValueFromLua( lua_State *L, int Index ) + template<> + Uint8 ReadValueFromLua( lua_State *L, int Index ) { return ReadIntValueFromLua( L, Index ); } diff --git a/RenderScript/src/ScriptParser.cpp b/RenderScript/src/ScriptParser.cpp index 8e65d75..e08f422 100644 --- a/RenderScript/src/ScriptParser.cpp +++ b/RenderScript/src/ScriptParser.cpp @@ -182,6 +182,7 @@ namespace Diligent // The string is always zero-terminated and Lua ensures that this pointer is valid as long // as the corresponding value is in the stack. auto ErrorMsg = lua_tostring( m_LuaState, -1 ); + lua_pop(m_LuaState, 1); // pop error message from the stack if( ErrorMsg ) { @@ -191,7 +192,6 @@ namespace Diligent { LOG_ERROR_AND_THROW( "Failed to parse the script file." ); } - lua_pop( m_LuaState, 1 ); // pop error message from the stack } } -- cgit v1.2.3