From 3acbe8145c60f4d1e7a180b4602a94269a489df5 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Thu, 27 Apr 2023 12:36:59 +0800 Subject: Fix most of the disabled warnings on gcc/clang (#2839) --- source/slang/slang-parameter-binding.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'source/slang/slang-parameter-binding.cpp') diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp index 1edd87d3a..bd33b6f37 100644 --- a/source/slang/slang-parameter-binding.cpp +++ b/source/slang/slang-parameter-binding.cpp @@ -1089,8 +1089,7 @@ void generateParameterBindings( static void completeBindingsForParameterImpl( ParameterBindingContext* context, RefPtr firstVarLayout, - ParameterBindingInfo bindingInfos[kLayoutResourceKindCount], - RefPtr parameterInfo) + ParameterBindingInfo bindingInfos[kLayoutResourceKindCount]) { // For any resource kind used by the parameter // we need to update its layout information @@ -1316,8 +1315,7 @@ static void completeBindingsForParameter( completeBindingsForParameterImpl( context, varLayout, - parameterInfo->bindingInfo, - parameterInfo); + parameterInfo->bindingInfo); // At this point we should have explicit binding locations chosen for // all the relevant resource kinds, so we can apply these to the @@ -1334,8 +1332,7 @@ static void completeBindingsForParameter( completeBindingsForParameterImpl( context, varLayout, - bindingInfos, - nullptr); + bindingInfos); applyBindingInfoToParameter(varLayout, bindingInfos); } @@ -1942,9 +1939,9 @@ static RefPtr processEntryPointVaryingParameter( return arrayTypeLayout; } // Ignore a bunch of types that don't make sense here... - else if (auto textureType = as(type)) { return nullptr; } - else if(auto samplerStateType = as(type)) { return nullptr; } - else if(auto constantBufferType = as(type)) { return nullptr; } + else if (const auto textureType = as(type)) { return nullptr; } + else if(const auto samplerStateType = as(type)) { return nullptr; } + else if(const auto constantBufferType = as(type)) { return nullptr; } // Catch declaration-reference types late in the sequence, since // otherwise they will include all of the above cases... else if( auto declRefType = as(type) ) @@ -2085,7 +2082,7 @@ static RefPtr processEntryPointVaryingParameter( } } // If we ran into an error in checking the user's code, then skip this parameter - else if( auto errorType = as(type) ) + else if( const auto errorType = as(type) ) { return nullptr; } -- cgit v1.2.3