mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-13 05:50:04 -04:00
Extend check for function pointers on creating compare operators of structs. (#1348)
This commit is contained in:
parent
9748e47228
commit
fac74444fa
@ -9050,9 +9050,10 @@ std::string VulkanHppGenerator::generateStructCompareOperators( std::pair<std::s
|
||||
std::string compareBody, spaceshipOperator, spaceshipOperatorIf, spaceshipOperatorElse, spaceshipOperatorEndif;
|
||||
if ( nonDefaultCompare )
|
||||
{
|
||||
assert( !containsFuncPointer( structData.first ) );
|
||||
compareBody = " return " + compareMembers + ";";
|
||||
|
||||
if ( !containsFuncPointer( structData.first ) )
|
||||
{
|
||||
static const std::string spaceshipOperatorTemplate =
|
||||
R"( ${ordering} operator<=>( ${name} const & rhs ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
@ -9065,6 +9066,7 @@ ${spaceshipMembers}
|
||||
spaceshipOperatorElse = "#endif\n";
|
||||
spaceshipOperatorEndif = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// use reflection only if VULKAN_HPP_USE_REFLECT is defined
|
||||
|
Loading…
x
Reference in New Issue
Block a user