Merge pull request #1067 from asuessenbach/check

Remove check on missing enum values as selections of a union, which is allowed.
This commit is contained in:
Andreas Süßenbach
2021-09-13 10:49:30 +02:00
committed by GitHub

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