Reduced listing of unused VkStructureType value from error to warning. (#1664)

This commit is contained in:
Andreas Süßenbach 2023-09-26 15:05:54 +02:00 committed by GitHub
parent 3e1e9b4653
commit f1b8af1157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 12 deletions

View File

@ -1482,7 +1482,7 @@ void VulkanHppGenerator::checkStructCorrectness() const
else
{
// check for non-alias structureTypes only
checkForError( !enumValue.alias.empty() || ( sTypeValues.erase( enumValue.name ) == 1 ),
checkForWarning( !enumValue.alias.empty() || ( sTypeValues.erase( enumValue.name ) == 1 ),
enumValue.xmlLine,
"VkStructureType enum value <" + enumValue.name + "> never used" );
}
@ -11813,7 +11813,8 @@ std::string VulkanHppGenerator::generateSharedHandle( std::pair<std::string, Han
using Shared${type} = SharedHandle<${type}>;
${aliasHandle})";
return replaceWithMap( sharedHandleTemplate,
return replaceWithMap(
sharedHandleTemplate,
{ { "aliasHandle", aliasHandle },
{ "deleterAction", ( handleData.second.deleteCommand.substr( 2, 4 ) == "Free" ) ? "Free" : "Destroy" },
{ "deleterPool", handleData.second.deletePool.empty() ? "" : ", " + stripPrefix( handleData.second.deletePool, "Vk" ) },