From ac10dafd732043ebf6f04f8a18ad78196c7c6804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20S=C3=BC=C3=9Fenbach?= Date: Mon, 13 May 2019 12:06:41 +0200 Subject: [PATCH] Add handling of "comment" to disabled extensions. (#330) --- VulkanHppGenerator.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 09a4a34..64247df 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -1426,7 +1426,7 @@ void VulkanHppGenerator::readExtensionDisabledRequire(tinyxml2::XMLElement const { checkAttributes(getAttributes(element), element->GetLineNum(), {}, {}); std::vector 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 attributes = getAttributes(child); checkAttributes(attributes, child->GetLineNum(), { { "name",{} } }, { { "bitpos",{} },{ "extends",{} },{ "offset",{} },{ "value",{} } }); } + else + { + assert(value == "comment"); + } } }