diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-04-27 12:36:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-26 21:36:59 -0700 |
| commit | 3acbe8145c60f4d1e7a180b4602a94269a489df5 (patch) | |
| tree | 8031e7ca897260ac3ab6d2a920864f3114bc8668 /source/slang/slang-parameter-binding.cpp | |
| parent | a3da31c189a1cc9bdf85a42ac359b8c2777f3550 (diff) | |
Fix most of the disabled warnings on gcc/clang (#2839)
Diffstat (limited to 'source/slang/slang-parameter-binding.cpp')
| -rw-r--r-- | source/slang/slang-parameter-binding.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
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<VarLayout> firstVarLayout, - ParameterBindingInfo bindingInfos[kLayoutResourceKindCount], - RefPtr<ParameterInfo> 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<TypeLayout> processEntryPointVaryingParameter( return arrayTypeLayout; } // Ignore a bunch of types that don't make sense here... - else if (auto textureType = as<TextureType>(type)) { return nullptr; } - else if(auto samplerStateType = as<SamplerStateType>(type)) { return nullptr; } - else if(auto constantBufferType = as<ConstantBufferType>(type)) { return nullptr; } + else if (const auto textureType = as<TextureType>(type)) { return nullptr; } + else if(const auto samplerStateType = as<SamplerStateType>(type)) { return nullptr; } + else if(const auto constantBufferType = as<ConstantBufferType>(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<DeclRefType>(type) ) @@ -2085,7 +2082,7 @@ static RefPtr<TypeLayout> processEntryPointVaryingParameter( } } // If we ran into an error in checking the user's code, then skip this parameter - else if( auto errorType = as<ErrorType>(type) ) + else if( const auto errorType = as<ErrorType>(type) ) { return nullptr; } |
