summaryrefslogtreecommitdiffstats
path: root/RenderScript
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-06 05:12:45 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-06 05:12:45 +0000
commit624b8be46f38a695f6f9e4c7ea07cd8f370c04b4 (patch)
tree24e9e62b8e0c2c2cae1c0026ef36010fd09214a1 /RenderScript
parentCMake: Added grouping of projects in VS solution (diff)
downloadDiligentTools-624b8be46f38a695f6f9e4c7ea07cd8f370c04b4.tar.gz
DiligentTools-624b8be46f38a695f6f9e4c7ea07cd8f370c04b4.zip
Updated cmake files; fixed build warnings
Diffstat (limited to 'RenderScript')
-rw-r--r--RenderScript/include/LuaBindings.h2
-rw-r--r--RenderScript/src/LuaBindings.cpp5
-rw-r--r--RenderScript/src/ScriptParser.cpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/RenderScript/include/LuaBindings.h b/RenderScript/include/LuaBindings.h
index 19df66c..2a27720 100644
--- a/RenderScript/include/LuaBindings.h
+++ b/RenderScript/include/LuaBindings.h
@@ -476,7 +476,7 @@ namespace Diligent
int ArrayInd = 1;
for( auto it = m_EnumMapping.m_Val2StrMap.begin(); it != m_EnumMapping.m_Val2StrMap.end(); ++it )
{
- if( (Flags & it->first) == it->first )
+ if( static_cast<EnumType>(Flags & it->first) == it->first )
{
lua_pushnumber( L, ArrayInd ); // -0 | +1 -> +1
PushValue<const String&>( L, it->second ); // -0 | +1 -> +1
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<typename Type>
- 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<Uint32>( L, Index );
}
- template<>Uint8 ReadValueFromLua<Uint8>( lua_State *L, int Index )
+ template<>
+ Uint8 ReadValueFromLua<Uint8>( lua_State *L, int Index )
{
return ReadIntValueFromLua<Uint8>( 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
}
}