Relax check for commands listed as required for a feature to just check if it's required for a different feature (#1896)

This commit is contained in:
Andreas Süßenbach 2024-06-12 13:52:23 +02:00 committed by GitHub
parent b35470b05f
commit 600e6d67a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8706,16 +8706,19 @@ std::string VulkanHppGenerator::generateRAIIHandleCommandDeclarations( std::pair
else if ( handle.second.secondLevelCommands.contains( command.first ) )
{
auto listedIt = listedCommands.find( command.first );
if ( listedIt != listedCommands.end() )
if ( listedIt == listedCommands.end() )
{
checkForError( false,
listedCommands.insert( { command.first, { feature.name, command.second } } );
assert( !handle.first.empty() );
secondLevelCommands.push_back( command.first );
}
else
{
checkForError( listedIt->second.first == feature.name,
command.second,
"command <" + command.first + "> already listed as required for feature <" + listedIt->second.first + "> on line " +
std::to_string( listedIt->second.second ) );
}
listedCommands.insert( { command.first, { feature.name, command.second } } );
assert( !handle.first.empty() );
secondLevelCommands.push_back( command.first );
}
}
}