Merge pull request #1267 from asuessenbach/assert

Resolved an assertion in readTypesTypeStruct.
This commit is contained in:
Andreas Süßenbach 2022-03-29 09:51:50 +02:00 committed by GitHub
commit 91cd6b0443
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13748,7 +13748,7 @@ void VulkanHppGenerator::readTypesTypeStruct( tinyxml2::XMLElement const * eleme
checkAttributes( line, checkAttributes( line,
attributes, attributes,
{ { "category", { isUnion ? "union" : "struct" } }, { "name", {} } }, { { "category", { isUnion ? "union" : "struct" } }, { "name", {} } },
{ { "allowduplicate", { "true" } }, { "comment", {} }, { "returnedonly", { "true" } }, { "structextends", {} } } ); { { "allowduplicate", { "false", "true" } }, { "comment", {} }, { "returnedonly", { "true" } }, { "structextends", {} } } );
std::vector<tinyxml2::XMLElement const *> children = getChildElements( element ); std::vector<tinyxml2::XMLElement const *> children = getChildElements( element );
checkElements( line, children, {}, { "member", "comment" } ); checkElements( line, children, {}, { "member", "comment" } );
@ -13760,8 +13760,7 @@ void VulkanHppGenerator::readTypesTypeStruct( tinyxml2::XMLElement const * eleme
{ {
if ( attribute.first == "allowduplicate" ) if ( attribute.first == "allowduplicate" )
{ {
assert( attribute.second == "true" ); allowDuplicate = ( attribute.second == "true" );
allowDuplicate = true;
} }
else if ( attribute.first == "category" ) else if ( attribute.first == "category" )
{ {