mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
C++20: Synthesize operator!=
From operator==
The inequality operator is automatically generated by the compiler if `operator==` is defined.
This commit is contained in:
@ -39,7 +39,6 @@ struct DepthStencilSelector
|
||||
enum CompareMode CompareMode() const { return static_cast<enum CompareMode>(value >> 1); }
|
||||
|
||||
bool operator==(const DepthStencilSelector& other) const { return value == other.value; }
|
||||
bool operator!=(const DepthStencilSelector& other) const { return !(*this == other); }
|
||||
static constexpr size_t N_VALUES = 1 << 4;
|
||||
};
|
||||
|
||||
@ -65,7 +64,6 @@ struct SamplerSelector
|
||||
bool AnisotropicFiltering() const { return ((value >> 3) & 1); }
|
||||
|
||||
bool operator==(const SamplerSelector& other) const { return value == other.value; }
|
||||
bool operator!=(const SamplerSelector& other) const { return !(*this == other); }
|
||||
static constexpr size_t N_VALUES = (1 << 4) * 9;
|
||||
};
|
||||
|
||||
|
@ -191,11 +191,6 @@ void SHADER::DestroyShaders()
|
||||
}
|
||||
}
|
||||
|
||||
bool PipelineProgramKey::operator!=(const PipelineProgramKey& rhs) const
|
||||
{
|
||||
return !operator==(rhs);
|
||||
}
|
||||
|
||||
bool PipelineProgramKey::operator==(const PipelineProgramKey& rhs) const
|
||||
{
|
||||
return std::tie(vertex_shader_id, geometry_shader_id, pixel_shader_id) ==
|
||||
|
@ -48,7 +48,6 @@ struct PipelineProgramKey
|
||||
u64 pixel_shader_id;
|
||||
|
||||
bool operator==(const PipelineProgramKey& rhs) const;
|
||||
bool operator!=(const PipelineProgramKey& rhs) const;
|
||||
bool operator<(const PipelineProgramKey& rhs) const;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user