From 03de737f0d18526b99b59a1810c7e290b66f4be2 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 6 Jul 2017 11:11:01 -0700 Subject: Fix many warnings-as-errors issues. The code should now compile cleanly with warnings as errors for VS2015 with `W3`. Most of the changes had to do with propagating a real pointer-sized integer type through code that had been using `int`. --- source/slang/reflection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/slang/reflection.cpp') diff --git a/source/slang/reflection.cpp b/source/slang/reflection.cpp index 40cd7061b..f71435c6f 100644 --- a/source/slang/reflection.cpp +++ b/source/slang/reflection.cpp @@ -191,11 +191,11 @@ SLANG_API size_t spReflectionType_GetElementCount(SlangReflectionType* inType) if(auto arrayType = dynamic_cast(type)) { - return GetIntVal(arrayType->ArrayLength); + return (size_t) GetIntVal(arrayType->ArrayLength); } else if( auto vectorType = dynamic_cast(type)) { - return GetIntVal(vectorType->elementCount); + return (size_t) GetIntVal(vectorType->elementCount); } return 0; @@ -688,7 +688,7 @@ SLANG_API unsigned spReflection_GetParameterCount(SlangReflection* inProgram) if(auto globalStructLayout = globalLayout.As()) { - return globalStructLayout->fields.Count(); + return (unsigned) globalStructLayout->fields.Count(); } return 0; -- cgit v1.2.3