Merge pull request #951 from asuessenbach/sort

Correct sorting extensions by number
This commit is contained in:
Andreas Süßenbach 2021-04-29 08:05:15 +02:00 committed by GitHub
commit acb75fe9dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 917 additions and 916 deletions

View File

@ -2274,14 +2274,15 @@ void VulkanHppGenerator::appendDispatchLoaderStatic( std::string & str )
}
}
std::map<std::string, std::map<std::string, ExtensionData>::const_iterator> numberToExtensionMap;
std::map<int, std::map<std::string, ExtensionData>::const_iterator> extensionsByNumber;
for ( auto extensionIt = m_extensions.begin(); extensionIt != m_extensions.end(); ++extensionIt )
{
assert( numberToExtensionMap.find( extensionIt->second.number ) == numberToExtensionMap.end() );
numberToExtensionMap[extensionIt->second.number] = extensionIt;
int number = atoi( extensionIt->second.number.c_str() );
assert( extensionsByNumber.find( number ) == extensionsByNumber.end() );
extensionsByNumber[number] = extensionIt;
}
for ( auto const & extIt : numberToExtensionMap )
for ( auto const & extIt : extensionsByNumber )
{
if ( !extIt.second->second.commands.empty() )
{

File diff suppressed because it is too large Load Diff