Merge pull request #1041 from asuessenbach/check

move checks on StructureAliases before checks on Structures.
This commit is contained in:
Andreas Süßenbach 2021-08-04 17:18:59 +02:00 committed by GitHub
commit b00d8e8a23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1368,6 +1368,17 @@ void VulkanHppGenerator::checkHandleCorrectness() const
void VulkanHppGenerator::checkStructCorrectness()
{
for ( auto const & structAlias : m_structureAliases )
{
auto structIt = m_structures.find( structAlias.second.alias );
check( structIt != m_structures.end(),
structAlias.second.xmlLine,
"unknown struct alias <" + structAlias.second.alias + ">" );
check( structIt->second.aliases.insert( structAlias.first ).second,
structIt->second.xmlLine,
"struct <" + structIt->first + "> already uses alias <" + structAlias.first + ">" );
}
std::set<std::string> sTypeValues;
for ( auto const & structure : m_structures )
{
@ -1416,15 +1427,6 @@ void VulkanHppGenerator::checkStructCorrectness()
}
}
assert( sTypeValues.empty() );
for ( auto const & structAlias : m_structureAliases )
{
auto structIt = m_structures.find( structAlias.second.alias );
check( structIt != m_structures.end(), structAlias.second.xmlLine, "unknown struct alias <" + structAlias.second.alias + ">" );
check( structIt->second.aliases.insert( structAlias.first ).second,
structIt->second.xmlLine,
"struct <" + structIt->first + "> already uses alias <" + structAlias.first + ">" );
}
}
void VulkanHppGenerator::checkStructMemberCorrectness( std::string const & structureName,