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 } });
@ -2542,15 +2532,9 @@ 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 += "vk::operator==( " + member.name + ", rhs." + member.name + " )";
}
else
{ {
compareMembers += "( " + member.name + " == rhs." + member.name + " )"; compareMembers += "( " + member.name + " == rhs." + member.name + " )";
} }
}
else else
{ {
compareMembers += "( memcmp( " + member.name + ", rhs." + member.name + ", " + member.arraySize + " * sizeof( " + member.type.compose() + " ) ) == 0 )"; compareMembers += "( memcmp( " + member.name + ", rhs." + member.name + ", " + member.arraySize + " * sizeof( " + member.type.compose() + " ) ) == 0 )";

File diff suppressed because it is too large Load Diff