From 670d5a60b495c64a8a00d2521e2388eb5a892e07 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 10 Dec 2017 22:02:23 -0800 Subject: Fixed compiler warnings --- RenderScript/src/InputLayoutDescParser.cpp | 2 +- RenderScript/src/LuaBindings.cpp | 2 +- RenderScript/src/ResourceMappingParser.cpp | 2 +- RenderScript/src/ShaderParser.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'RenderScript') diff --git a/RenderScript/src/InputLayoutDescParser.cpp b/RenderScript/src/InputLayoutDescParser.cpp index 3732866..53d2605 100644 --- a/RenderScript/src/InputLayoutDescParser.cpp +++ b/RenderScript/src/InputLayoutDescParser.cpp @@ -70,7 +70,7 @@ namespace Diligent VERIFY( pBasePointer == _pBasePointer, "Sanity check failed" ); auto &Elements = GetMemberByOffest >( pBasePointer, m_LayoutElementsBufferOffset); auto CurrIndex = Elements.size(); - if( CurrIndex != NewArrayIndex - 1 ) + if( static_cast(CurrIndex) != NewArrayIndex - 1 ) SCRIPT_PARSING_ERROR( L, "Explicit array indices are not allowed in layout description. Provided index ", NewArrayIndex - 1, " conflicts with actual index ", CurrIndex, "." ); Elements.resize( CurrIndex + 1 ); ParseLuaTable( L, StackIndex, &(Elements)[CurrIndex], m_Bindings ); diff --git a/RenderScript/src/LuaBindings.cpp b/RenderScript/src/LuaBindings.cpp index 425acbb..360dac6 100644 --- a/RenderScript/src/LuaBindings.cpp +++ b/RenderScript/src/LuaBindings.cpp @@ -197,7 +197,7 @@ namespace Diligent { VERIFY( pBasePointer == &RawData, "Sanity check failed" ); auto CurrIndex = RawData.size() / ElemSize; - if( CurrIndex != NewArrayIndex - 1 ) + if(static_cast(CurrIndex) != NewArrayIndex - 1 ) SCRIPT_PARSING_ERROR( L, "Explicit array indices are not allowed in array initialization. Provided index ", NewArrayIndex - 1, " conflicts with actual index ", CurrIndex, "." ); RawData.resize( (CurrIndex + 1) * ElemSize ); auto CurrValue = ReadValueFromLua( L, StackIndex ); diff --git a/RenderScript/src/ResourceMappingParser.cpp b/RenderScript/src/ResourceMappingParser.cpp index 9956ef7..e75ff1c 100644 --- a/RenderScript/src/ResourceMappingParser.cpp +++ b/RenderScript/src/ResourceMappingParser.cpp @@ -53,7 +53,7 @@ namespace Diligent { VERIFY( pBasePointer == &Entries, "Sanity check failed" ); auto CurrIndex = Entries.size(); - if( CurrIndex != NewArrayIndex - 1 ) + if( static_cast(CurrIndex) != NewArrayIndex - 1 ) SCRIPT_PARSING_ERROR( L, "Explicit array indices are not allowed in resource mapping description. Provided index ", NewArrayIndex - 1, " conflicts with actual index ", CurrIndex, "." ); Entries.resize( CurrIndex + 1 ); ParseLuaTable( L, StackIndex, &(Entries)[CurrIndex], m_Bindings ); diff --git a/RenderScript/src/ShaderParser.cpp b/RenderScript/src/ShaderParser.cpp index 12d9157..1b48c26 100644 --- a/RenderScript/src/ShaderParser.cpp +++ b/RenderScript/src/ShaderParser.cpp @@ -97,7 +97,7 @@ namespace Diligent VERIFY_EXPR( pBasePointer == _pBasePointer ); auto CurrIndex = ShaderVarDescBuffer.size(); - if( CurrIndex != NewArrayIndex - 1 ) + if( static_cast(CurrIndex) != NewArrayIndex - 1 ) SCRIPT_PARSING_ERROR( L, "Explicit array indices are not allowed in shader name description. Provided index ", NewArrayIndex - 1, " conflicts with actual index ", CurrIndex, "." ); ShaderVarDescBuffer.resize( CurrIndex + 1 ); ShaderNamesBuffer.resize( CurrIndex + 1 ); @@ -202,7 +202,7 @@ namespace Diligent VERIFY_EXPR( pBasePointer == _pBasePointer ); auto CurrIndex = StaticSamplersBuffer.size(); - if( CurrIndex != NewArrayIndex - 1 ) + if(static_cast(CurrIndex) != NewArrayIndex - 1 ) SCRIPT_PARSING_ERROR( L, "Explicit array indices are not allowed in static sampler description. Provided index ", NewArrayIndex - 1, " conflicts with actual index ", CurrIndex, "." ); StaticSamplersBuffer.resize( CurrIndex + 1 ); StaticSamplerTexNamesBuffer.resize( CurrIndex + 1 ); -- cgit v1.2.3