Add unique-versions of "Register"-functions (currently just registerEventEXTUnique and registerDisplayEventEXTUnique) (#421)

This commit is contained in:
Andreas Süßenbach
2019-11-06 14:45:13 +01:00
committed by Markus Tavenrath
parent 5512f6df92
commit cea5d7fae3
2 changed files with 33 additions and 1 deletions

View File

@@ -990,7 +990,9 @@ void VulkanHppGenerator::appendCommand(std::string & str, std::string const& ind
assert(m_commandToHandle.find(commandData.first) != m_commandToHandle.end());
auto handleIt = m_handles.find(m_commandToHandle.find(commandData.first)->second);
assert(handleIt != m_handles.end());
if ((!handleIt->second.deleteCommand.empty() || specialWriteUnique) && ((commandData.first.substr(2, 8) == "Allocate") || (commandData.first.substr(2, 6) == "Create")))
if ((!handleIt->second.deleteCommand.empty() || specialWriteUnique)
&& ((commandData.first.substr(2, 8) == "Allocate") || (commandData.first.substr(2, 6) == "Create")
|| ((commandData.first.substr(2, 8) == "Register") && (returnParamIndex + 1 == commandData.second.params.size()))))
{
enhanced += "#ifndef VULKAN_HPP_NO_SMART_HANDLE\n";
appendFunction(enhanced, indentation, name, commandData, returnParamIndex, templateParamIndex, vectorParamIndices, twoStep, enhancedReturnType, definition, true, false, true, false, false);