mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-14 06:23:07 -04:00
Only emit union constructors and setters if !returnedonly (#369)
This commit is contained in:
parent
b4e27f9be0
commit
c5e8f86a58
@ -4175,6 +4175,8 @@ void VulkanHppGenerator::writeUnion(std::ostream & os, std::pair<std::string, St
|
||||
<< " union " << stripPrefix(structure.first, "Vk") << std::endl
|
||||
<< " {" << std::endl;
|
||||
|
||||
if (!structure.second.returnedOnly)
|
||||
{
|
||||
bool firstTime = true;
|
||||
for (auto const& member : structure.second.members)
|
||||
{
|
||||
@ -4209,6 +4211,7 @@ void VulkanHppGenerator::writeUnion(std::ostream & os, std::pair<std::string, St
|
||||
{
|
||||
writeStructSetter(os, stripPrefix(structure.first, "Vk"), member);
|
||||
}
|
||||
}
|
||||
|
||||
// the implicit cast operators to the native type
|
||||
os << " operator " << structure.first << " const&() const" << std::endl
|
||||
|
Loading…
x
Reference in New Issue
Block a user