Updated all array_view uses with the C++20 span. (#7157)
* Updated all array_view uses with the C++20 span. The updates were done in the following order 1. `AZStd::array_view<([^>].+)\* ?>` -> `AZStd::span<\1 const>` 2. `AZStd::array_view<(?:const )(.+)>` -> `AZStd::span<const \1>` 3. `AZStd::array_view` -> `AZStd::span` Removed the implementation of array_view. Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Added missing whitespace between `const` and the typename for spans. Updated the ShaderTest comparison of the ShaderResourceGroupLayout span to compare the sizes as well Updated comments on some of the methods that stated that they return "an array" to mention they return "a span". Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
48cea89910
commit
b9824ed172
@@ -432,7 +432,7 @@ namespace AZ
|
||||
m_bindingSlot = Handle<uint32_t>(bindingSlot);
|
||||
}
|
||||
|
||||
AZStd::array_view<ShaderInputStaticSamplerDescriptor> ShaderResourceGroupLayout::GetStaticSamplers() const
|
||||
AZStd::span<const ShaderInputStaticSamplerDescriptor> ShaderResourceGroupLayout::GetStaticSamplers() const
|
||||
{
|
||||
return m_staticSamplers;
|
||||
}
|
||||
@@ -497,32 +497,32 @@ namespace AZ
|
||||
return m_constantsDataLayout->GetShaderInput(index);
|
||||
}
|
||||
|
||||
AZStd::array_view<ShaderInputBufferDescriptor> ShaderResourceGroupLayout::GetShaderInputListForBuffers() const
|
||||
AZStd::span<const ShaderInputBufferDescriptor> ShaderResourceGroupLayout::GetShaderInputListForBuffers() const
|
||||
{
|
||||
return m_inputsForBuffers;
|
||||
}
|
||||
|
||||
AZStd::array_view<ShaderInputImageDescriptor> ShaderResourceGroupLayout::GetShaderInputListForImages() const
|
||||
AZStd::span<const ShaderInputImageDescriptor> ShaderResourceGroupLayout::GetShaderInputListForImages() const
|
||||
{
|
||||
return m_inputsForImages;
|
||||
}
|
||||
|
||||
AZStd::array_view<ShaderInputSamplerDescriptor> ShaderResourceGroupLayout::GetShaderInputListForSamplers() const
|
||||
AZStd::span<const ShaderInputSamplerDescriptor> ShaderResourceGroupLayout::GetShaderInputListForSamplers() const
|
||||
{
|
||||
return m_inputsForSamplers;
|
||||
}
|
||||
|
||||
AZStd::array_view<ShaderInputConstantDescriptor> ShaderResourceGroupLayout::GetShaderInputListForConstants() const
|
||||
AZStd::span<const ShaderInputConstantDescriptor> ShaderResourceGroupLayout::GetShaderInputListForConstants() const
|
||||
{
|
||||
return m_constantsDataLayout->GetShaderInputList();
|
||||
}
|
||||
|
||||
AZStd::array_view<ShaderInputBufferUnboundedArrayDescriptor> ShaderResourceGroupLayout::GetShaderInputListForBufferUnboundedArrays() const
|
||||
AZStd::span<const ShaderInputBufferUnboundedArrayDescriptor> ShaderResourceGroupLayout::GetShaderInputListForBufferUnboundedArrays() const
|
||||
{
|
||||
return m_inputsForBufferUnboundedArrays;
|
||||
}
|
||||
|
||||
AZStd::array_view<ShaderInputImageUnboundedArrayDescriptor> ShaderResourceGroupLayout::GetShaderInputListForImageUnboundedArrays() const
|
||||
AZStd::span<const ShaderInputImageUnboundedArrayDescriptor> ShaderResourceGroupLayout::GetShaderInputListForImageUnboundedArrays() const
|
||||
{
|
||||
return m_inputsForImageUnboundedArrays;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user