Accept type size_t for vector size in vector-describing structure. (#1895)

This commit is contained in:
Andreas Süßenbach 2024-06-12 08:41:25 +02:00 committed by GitHub
parent d507727fd7
commit b35470b05f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1721,7 +1721,7 @@ bool VulkanHppGenerator::containsUnion( std::string const & type ) const
bool VulkanHppGenerator::describesVector( StructureData const & structure, std::string const & type ) const
{
return ( structure.members.size() == 4 ) && ( structure.members[0].name == "sType" ) && ( structure.members[1].name == "pNext" ) &&
structure.members[2].type.isValue() && ( structure.members[2].type.type == "uint32_t" ) &&
structure.members[2].type.isValue() && ( ( structure.members[2].type.type == "size_t" ) || ( structure.members[2].type.type == "uint32_t" ) ) &&
( type.empty() ? true : ( structure.members[3].type.type == type ) ) && structure.members[3].type.isNonConstPointer() &&
( structure.members[3].lenMembers.size() == 1 ) && ( structure.members[3].lenMembers[0].second == 2 );
}