used newly ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR
This commit is contained in:
parent
b6c10dca4a
commit
074cb9cc19
@ -92,8 +92,7 @@ constexpr char *DescriptSetsTypeName[]=
|
|||||||
|
|
||||||
inline const char *GetDescriptorSetsTypeName(const enum class DescriptorSetsType &type)
|
inline const char *GetDescriptorSetsTypeName(const enum class DescriptorSetsType &type)
|
||||||
{
|
{
|
||||||
if(!ENUM_CLASS_RANGE_CHECK(DescriptorSetsType,type))
|
ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(type);
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
return DescriptSetsTypeName[(size_t)type];
|
return DescriptSetsTypeName[(size_t)type];
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
DescriptorSets *GPUDevice::CreateDescriptorSets(const PipelineLayoutData *pld,const DescriptorSetsType &type)const
|
DescriptorSets *GPUDevice::CreateDescriptorSets(const PipelineLayoutData *pld,const DescriptorSetsType &type)const
|
||||||
{
|
{
|
||||||
ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(DescriptorSetsType,type);
|
ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(type);
|
||||||
|
|
||||||
const uint32_t binding_count=pld->binding_count[size_t(type)];
|
const uint32_t binding_count=pld->binding_count[size_t(type)];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user