Correct enum values for some video decode enums.

This commit is contained in:
asuessenbach
2021-05-27 19:27:58 +02:00
parent 5a8b054ca2
commit 47af02da37
2 changed files with 53 additions and 64 deletions

View File

@@ -632,7 +632,7 @@ std::string toUpperCase( std::string const & name )
bool previousIsDigit = false;
for ( auto c : name )
{
if ( ( isupper( c ) && ( previousIsLowerCase || previousIsDigit ) ) || ( isdigit( c ) && !previousIsDigit ) )
if ( ( isupper( c ) && ( previousIsLowerCase || previousIsDigit ) ) || ( isdigit( c ) && previousIsLowerCase ) )
{
convertedName.push_back( '_' );
}
@@ -12731,20 +12731,19 @@ void VulkanHppGenerator::readEnum( tinyxml2::XMLElement const * el
if ( attribute.first == "bitpos" )
{
bitpos = attribute.second;
check( !bitpos.empty(), line, "enum with empty bitpos" );
}
else if ( attribute.first == "name" )
{
name = attribute.second;
check( !name.empty(), line, "enum with empty name" );
}
else if ( attribute.first == "value" )
{
value = attribute.second;
check( !value.empty(), line, "enum with empty value" );
}
}
assert( !name.empty() );
warn( beginsWith( name, prefix ),
line,
"encountered enum value <" + name + "> that does not begin with expected prefix <" + prefix + ">" );
std::string tag = findTag( m_tags, name, postfix );