Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11022 from merryhime/ambiguous-reversed-operator
MTLObjectCache: Correct signature of equality operator
  • Loading branch information
AdmiralCurtiss committed Aug 30, 2022
2 parents 6d61e6a + 362167f commit fb88a4e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Core/VideoBackends/Metal/MTLObjectCache.h
Expand Up @@ -37,8 +37,8 @@ struct DepthStencilSelector
bool UpdateEnable() const { return value & 1; }
enum CompareMode CompareMode() const { return static_cast<enum CompareMode>(value >> 1); }

bool operator==(const DepthStencilSelector& other) { return value == other.value; }
bool operator!=(const DepthStencilSelector& other) { return !(*this == other); }
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;
};

Expand All @@ -63,8 +63,8 @@ struct SamplerSelector
WrapMode WrapV() const { return static_cast<WrapMode>((value >> 4) / 3); }
bool AnisotropicFiltering() const { return ((value >> 3) & 1); }

bool operator==(const SamplerSelector& other) { return value == other.value; }
bool operator!=(const SamplerSelector& other) { return !(*this == other); }
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;
};

Expand Down

0 comments on commit fb88a4e

Please sign in to comment.