Add an error check for struct members with their array size at the wrong position. (#2059)

This commit is contained in:
Andreas Süßenbach 2025-02-03 17:29:23 +01:00 committed by GitHub
parent 6b05ffe121
commit ad9104d2b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15686,6 +15686,9 @@ void VulkanHppGenerator::readStructMember( tinyxml2::XMLElement const * element,
}
assert( !name.empty() );
checkForError( ( memberData.type.postfix.length() < 3 ) || !memberData.type.postfix.starts_with( "[" ) || !memberData.type.postfix.ends_with( "]" ),
line,
"struct member <" + name + "> has its array size <" + memberData.type.postfix + "> at the wrong position" );
if ( api.empty() || ( api == m_api ) )
{
checkForError( std::none_of( members.begin(), members.end(), [&name]( MemberData const & md ) { return md.name == name; } ),