mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-29 23:21:05 +00:00
Add error message when referencing undefined type requirements (#473)
This commit is contained in:
parent
4ee2d61ef6
commit
d5f58e07dd
@ -803,7 +803,10 @@ void VulkanHppGenerator::appendBitmasks(std::string & str) const
|
|||||||
for (auto const& bitmask : m_bitmasks)
|
for (auto const& bitmask : m_bitmasks)
|
||||||
{
|
{
|
||||||
auto bitmaskBits = m_bitmaskBits.find(bitmask.second.requirement);
|
auto bitmaskBits = m_bitmaskBits.find(bitmask.second.requirement);
|
||||||
assert(bitmaskBits != m_bitmaskBits.end());
|
if (bitmaskBits == m_bitmaskBits.end())
|
||||||
|
{
|
||||||
|
throw std::runtime_error( bitmask.first + " references the undefined requirement '" + bitmask.second.requirement + "'");
|
||||||
|
}
|
||||||
|
|
||||||
std::string strippedBitmaskName = stripPrefix(bitmask.first, "Vk");
|
std::string strippedBitmaskName = stripPrefix(bitmask.first, "Vk");
|
||||||
std::string strippedEnumName = stripPrefix(bitmaskBits->first, "Vk");
|
std::string strippedEnumName = stripPrefix(bitmaskBits->first, "Vk");
|
||||||
|
Loading…
Reference in New Issue
Block a user