Remove not needed operator==() and operator!=() on *FlagBits (#442)

Resolves #436
This commit is contained in:
Andreas Süßenbach 2019-11-27 11:41:21 +01:00 committed by Markus Tavenrath
parent 7fc627d6b9
commit e40eb90980
2 changed files with 38 additions and 744 deletions

View File

@ -864,16 +864,6 @@ void VulkanHppGenerator::appendBitmask(std::string & str, std::string const& bit
{ {
return ~( ${bitmaskName}( bits ) ); return ~( ${bitmaskName}( bits ) );
} }
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator==( ${enumName} bit0, ${enumName} bit1 ) VULKAN_HPP_NOEXCEPT
{
return ${bitmaskName}( bit0 ) == bit1;
}
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR bool operator!=( ${enumName} bit0, ${enumName} bit1 ) VULKAN_HPP_NOEXCEPT
{
return ${bitmaskName}( bit0 ) != bit1;
}
)"; )";
str += replaceWithMap(bitmaskOperatorsTemplate, { { "bitmaskName", bitmaskName },{ "enumName", enumName },{ "allFlags", allFlags } }); str += replaceWithMap(bitmaskOperatorsTemplate, { { "bitmaskName", bitmaskName },{ "enumName", enumName },{ "allFlags", allFlags } });
@ -2543,13 +2533,7 @@ void VulkanHppGenerator::appendStructCompareOperators(std::string & str, std::pa
compareMembers += intro; compareMembers += intro;
if (member.arraySize.empty()) if (member.arraySize.empty())
{ {
if (m_bitmaskBits.find(member.type.type) != m_bitmaskBits.end()) { compareMembers += "( " + member.name + " == rhs." + member.name + " )";
compareMembers += "vk::operator==( " + member.name + ", rhs." + member.name + " )";
}
else
{
compareMembers += "( " + member.name + " == rhs." + member.name + " )";
}
} }
else else
{ {

File diff suppressed because it is too large Load Diff