mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-24 21:10:12 +00:00
Downgrade missing attribute "type" in enums in video.xml from error to warning (#1792)
This commit is contained in:
parent
1b6ea3c295
commit
a3ecb02131
@ -406,11 +406,11 @@ void VideoHppGenerator::readEnums( tinyxml2::XMLElement const * element )
|
||||
{
|
||||
int line = element->GetLineNum();
|
||||
std::map<std::string, std::string> attributes = getAttributes( element );
|
||||
checkAttributes( line, attributes, { { "name", {} }, { "type", { "enum" } } }, {} );
|
||||
checkAttributes( line, attributes, { { "name", {} } }, { { "type", { "enum" } } } );
|
||||
std::vector<tinyxml2::XMLElement const *> children = getChildElements( element );
|
||||
checkElements( line, children, { { "enum", {} } }, { "comment" } );
|
||||
|
||||
std::string name, type;
|
||||
std::string name;
|
||||
for ( auto const & attribute : attributes )
|
||||
{
|
||||
if ( attribute.first == "name" )
|
||||
@ -419,7 +419,8 @@ void VideoHppGenerator::readEnums( tinyxml2::XMLElement const * element )
|
||||
}
|
||||
else if ( attribute.first == "type" )
|
||||
{
|
||||
type = attribute.second;
|
||||
assert( !name.empty() );
|
||||
checkForError( attribute.second == "enum", line, "unknown type <" + attribute.second + "> for enum <" + name + ">" );
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user