Removed check on missing enum values as selections of a union, which is allowed.

This commit is contained in:
asuessenbach 2021-09-13 09:51:14 +02:00
parent a7a6e6de08
commit 1415ec96d9

View File

@ -1478,17 +1478,6 @@ void VulkanHppGenerator::checkStructMemberCorrectness( std::string const &
"union member <" + unionMember.name + "> uses selection <" + selection + "union member <" + unionMember.name + "> uses selection <" + selection +
"> that is not part of the selector type <" + selectorIt->type.type + ">" ); "> that is not part of the selector type <" + selectorIt->type.type + ">" );
} }
for ( auto const & selectorValue : selectorEnumIt->second.values )
{
// check that each enum value is used as a selection in the corresponding union
check( std::find_if( unionIt->second.members.begin(),
unionIt->second.members.end(),
[selectorValue]( MemberData const & md )
{ return md.selection == selectorValue.name; } ) != unionIt->second.members.end(),
selectorValue.xmlLine,
"enum <" + selectorEnumIt->first + "> has value <" + selectorValue.name +
"> that is not used by corresponding union <" + unionIt->first + ">" );
}
} }
// check that each member type is known // check that each member type is known