Add handling of "comment" to disabled extensions. (#330)

This commit is contained in:
Andreas Süßenbach 2019-05-13 12:06:41 +02:00 committed by GitHub
parent 5ce8ae7fd0
commit ac10dafd73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1426,7 +1426,7 @@ void VulkanHppGenerator::readExtensionDisabledRequire(tinyxml2::XMLElement const
{
checkAttributes(getAttributes(element), element->GetLineNum(), {}, {});
std::vector<tinyxml2::XMLElement const*> children = getChildElements(element);
checkElements(children, { "command", "enum", "type" });
checkElements(children, { "command", "comment", "enum", "type" });
for (auto child : children)
{
@ -1458,12 +1458,15 @@ void VulkanHppGenerator::readExtensionDisabledRequire(tinyxml2::XMLElement const
m_structures.erase(nameAttribute->second);
}
}
else
else if (value == "enum")
{
assert(value == "enum");
std::map<std::string, std::string> attributes = getAttributes(child);
checkAttributes(attributes, child->GetLineNum(), { { "name",{} } }, { { "bitpos",{} },{ "extends",{} },{ "offset",{} },{ "value",{} } });
}
else
{
assert(value == "comment");
}
}
}