mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Fix wrong naming of complex union member types. (#371)
This commit is contained in:
parent
c5e8f86a58
commit
4ac6dc4760
@ -4231,18 +4231,18 @@ void VulkanHppGenerator::writeUnion(std::ostream & os, std::pair<std::string, St
|
||||
if (needsUnrestrictedUnions)
|
||||
{
|
||||
os << "#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS" << std::endl;
|
||||
}
|
||||
for (auto const& member : structure.second.members)
|
||||
{
|
||||
os << " " << member.type.compose() << " " << member.name << (member.arraySize.empty() ? "" : ("[" + member.arraySize + "]")) << ";" << std::endl;
|
||||
}
|
||||
os << "#else" << std::endl;
|
||||
}
|
||||
for (auto const& member : structure.second.members)
|
||||
{
|
||||
os << " " << (beginsWith(member.type.type, "Vk") ? "Vk" : "") << member.type.compose() << " " << member.name << (member.arraySize.empty() ? "" : ("[" + member.arraySize + "]")) << ";" << std::endl;
|
||||
}
|
||||
if (needsUnrestrictedUnions)
|
||||
{
|
||||
os << "#else" << std::endl;
|
||||
for (auto const& member : structure.second.members)
|
||||
{
|
||||
os << " " << member.type.prefix + (member.type.prefix.empty() ? "" : " ") + member.type.type + member.type.postfix << " " << member.name << (member.arraySize.empty() ? "" : ("[" + member.arraySize + "]")) << ";" << std::endl;
|
||||
}
|
||||
os << "#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/" << std::endl;
|
||||
}
|
||||
os << " };" << std::endl;
|
||||
|
@ -100,7 +100,7 @@ static_assert( VK_HEADER_VERSION == 116 , "Wrong VK_HEADER_VERSION!" );
|
||||
#endif
|
||||
|
||||
#if !defined(VULKAN_HPP_INLINE)
|
||||
# if defined(__clang___)
|
||||
# if defined(__clang__)
|
||||
# if __has_attribute(always_inline)
|
||||
# define VULKAN_HPP_INLINE __attribute__((always_inline)) __inline__
|
||||
# else
|
||||
@ -22818,8 +22818,8 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
vk::ClearColorValue color;
|
||||
vk::ClearDepthStencilValue depthStencil;
|
||||
#else
|
||||
Vkvk::ClearColorValue color;
|
||||
Vkvk::ClearDepthStencilValue depthStencil;
|
||||
VkClearColorValue color;
|
||||
VkClearDepthStencilValue depthStencil;
|
||||
#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/
|
||||
};
|
||||
|
||||
@ -42361,7 +42361,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
uint32_t value32;
|
||||
uint64_t value64;
|
||||
float valueFloat;
|
||||
Vkvk::Bool32 valueBool;
|
||||
VkBool32 valueBool;
|
||||
const char* valueString;
|
||||
#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user