Only emit union constructors and setters if !returnedonly (#369)

This commit is contained in:
Jason Ekstrand 2019-08-14 04:57:10 -05:00 committed by Markus Tavenrath
parent b4e27f9be0
commit c5e8f86a58

View File

@ -4175,6 +4175,8 @@ void VulkanHppGenerator::writeUnion(std::ostream & os, std::pair<std::string, St
<< " union " << stripPrefix(structure.first, "Vk") << std::endl << " union " << stripPrefix(structure.first, "Vk") << std::endl
<< " {" << std::endl; << " {" << std::endl;
if (!structure.second.returnedOnly)
{
bool firstTime = true; bool firstTime = true;
for (auto const& member : structure.second.members) 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); writeStructSetter(os, stripPrefix(structure.first, "Vk"), member);
} }
}
// the implicit cast operators to the native type // the implicit cast operators to the native type
os << " operator " << structure.first << " const&() const" << std::endl os << " operator " << structure.first << " const&() const" << std::endl