mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-08 19:36:44 -04:00
Add an error check for struct members with their array size at the wrong position. (#2059)
This commit is contained in:
parent
6b05ffe121
commit
ad9104d2b4
@ -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; } ),
|
||||
|
Loading…
x
Reference in New Issue
Block a user