mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-14 16:21:06 +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)
|
if (needsUnrestrictedUnions)
|
||||||
{
|
{
|
||||||
os << "#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS" << std::endl;
|
os << "#ifdef VULKAN_HPP_HAS_UNRESTRICTED_UNIONS" << std::endl;
|
||||||
|
}
|
||||||
for (auto const& member : structure.second.members)
|
for (auto const& member : structure.second.members)
|
||||||
{
|
{
|
||||||
os << " " << member.type.compose() << " " << member.name << (member.arraySize.empty() ? "" : ("[" + member.arraySize + "]")) << ";" << std::endl;
|
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)
|
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 << "#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/" << std::endl;
|
||||||
}
|
}
|
||||||
os << " };" << std::endl;
|
os << " };" << std::endl;
|
||||||
|
@ -100,7 +100,7 @@ static_assert( VK_HEADER_VERSION == 116 , "Wrong VK_HEADER_VERSION!" );
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(VULKAN_HPP_INLINE)
|
#if !defined(VULKAN_HPP_INLINE)
|
||||||
# if defined(__clang___)
|
# if defined(__clang__)
|
||||||
# if __has_attribute(always_inline)
|
# if __has_attribute(always_inline)
|
||||||
# define VULKAN_HPP_INLINE __attribute__((always_inline)) __inline__
|
# define VULKAN_HPP_INLINE __attribute__((always_inline)) __inline__
|
||||||
# else
|
# else
|
||||||
@ -22818,8 +22818,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
vk::ClearColorValue color;
|
vk::ClearColorValue color;
|
||||||
vk::ClearDepthStencilValue depthStencil;
|
vk::ClearDepthStencilValue depthStencil;
|
||||||
#else
|
#else
|
||||||
Vkvk::ClearColorValue color;
|
VkClearColorValue color;
|
||||||
Vkvk::ClearDepthStencilValue depthStencil;
|
VkClearDepthStencilValue depthStencil;
|
||||||
#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/
|
#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -42361,7 +42361,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||||||
uint32_t value32;
|
uint32_t value32;
|
||||||
uint64_t value64;
|
uint64_t value64;
|
||||||
float valueFloat;
|
float valueFloat;
|
||||||
Vkvk::Bool32 valueBool;
|
VkBool32 valueBool;
|
||||||
const char* valueString;
|
const char* valueString;
|
||||||
#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/
|
#endif /*VULKAN_HPP_HAS_UNRESTRICTED_UNIONS*/
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user