mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Don't create destroy functions for alias commands (#191)
This commit is contained in:
parent
164cd27be0
commit
8dbe1fa9d4
@ -1709,6 +1709,7 @@ void VulkanHppGenerator::readCommandsCommand(tinyxml2::XMLElement const* element
|
||||
assert(commandsIt != m_commands.end());
|
||||
commandData = commandsIt->second;
|
||||
commandData.fullName = startLowerCase(strip(attributes.find("name")->second, "vk"));
|
||||
commandData.isAlias = true;
|
||||
determineReducedName(commandData);
|
||||
linkCommandToHandle(commandData);
|
||||
|
||||
@ -4403,8 +4404,8 @@ ${commands}
|
||||
assert((cit != m_commands.end()) && !cit->second.className.empty());
|
||||
writeTypeCommand(commands, " ", cit->second, false);
|
||||
|
||||
// special handling for destroy functions
|
||||
if (((cit->second.fullName.substr(0, 7) == "destroy") && (cit->second.reducedName != "destroy")) || (cit->second.fullName.substr(0, 4) == "free"))
|
||||
// special handling for destroy functions which are not aliased.
|
||||
if (!cit->second.isAlias && (((cit->second.fullName.substr(0, 7) == "destroy") && (cit->second.reducedName != "destroy")) || (cit->second.fullName.substr(0, 4) == "free")))
|
||||
{
|
||||
CommandData shortenedCommand = cit->second;
|
||||
shortenedCommand.reducedName = (cit->second.fullName.substr(0, 7) == "destroy") ? "destroy" : "free";
|
||||
@ -4429,7 +4430,7 @@ ${commands}
|
||||
writeTypeCommand(os, " ", cit->second, true);
|
||||
|
||||
// special handling for destroy functions
|
||||
if (((cit->second.fullName.substr(0, 7) == "destroy") && (cit->second.reducedName != "destroy")) || (cit->second.fullName.substr(0, 4) == "free"))
|
||||
if (!cit->second.isAlias && (((cit->second.fullName.substr(0, 7) == "destroy") && (cit->second.reducedName != "destroy")) || (cit->second.fullName.substr(0, 4) == "free")))
|
||||
{
|
||||
CommandData shortenedCommand = cit->second;
|
||||
shortenedCommand.reducedName = (cit->second.fullName.substr(0, 7) == "destroy") ? "destroy" : "free";
|
||||
|
@ -103,6 +103,7 @@ class VulkanHppGenerator
|
||||
: returnParam(~0)
|
||||
, templateParam(~0)
|
||||
, twoStep(false)
|
||||
, isAlias(false)
|
||||
{}
|
||||
|
||||
std::string className;
|
||||
@ -117,8 +118,9 @@ class VulkanHppGenerator
|
||||
std::set<size_t> skippedParams;
|
||||
std::vector<std::string> successCodes;
|
||||
size_t templateParam;
|
||||
bool twoStep;
|
||||
std::map<size_t, size_t> vectorParams;
|
||||
bool twoStep;
|
||||
bool isAlias;
|
||||
};
|
||||
|
||||
struct DeleterData
|
||||
|
Loading…
Reference in New Issue
Block a user