mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2024-10-14 16:32:17 +00:00
Remove not needed operator==() and operator!=() on *FlagBits (#442)
Resolves #436
This commit is contained in:
parent
7fc627d6b9
commit
e40eb90980
@ -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
Loading…
Reference in New Issue
Block a user