diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-10-08 17:16:57 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-10-10 20:23:55 -0700 |
| commit | e8d5fb89e4465e8ef64920f12e7cb60e82057658 (patch) | |
| tree | eda79c38cbe3b018b91038d642ccc48bcc9f93b8 /Source/Core/VideoCommon | |
| parent | b5f7a508742671410c44fc6f0e66d0ce789c3b57 (diff) | |
C++20: Synthesize `operator!=` From `operator==`
The inequality operator is automatically generated by the compiler if `operator==` is defined.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/AbstractPipeline.h | 1 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/GXPipelineTypes.h | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.h | 1 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/RenderState.h | 5 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/ShaderGenCommon.h | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.h | 1 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureConfig.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureConfig.h | 1 |
9 files changed, 0 insertions, 23 deletions
diff --git a/Source/Core/VideoCommon/AbstractPipeline.h b/Source/Core/VideoCommon/AbstractPipeline.h index 1a0b0e9e4a..55a3b9fc41 100644 --- a/Source/Core/VideoCommon/AbstractPipeline.h +++ b/Source/Core/VideoCommon/AbstractPipeline.h @@ -60,7 +60,6 @@ struct AbstractPipelineConfig rhs.rasterization_state.hex, rhs.depth_state.hex, rhs.blending_state.hex, rhs.framebuffer_state.hex, rhs.usage); } - bool operator!=(const AbstractPipelineConfig& rhs) const { return !operator==(rhs); } bool operator<(const AbstractPipelineConfig& rhs) const { return std::tie(vertex_format, vertex_shader, geometry_shader, pixel_shader, diff --git a/Source/Core/VideoCommon/GXPipelineTypes.h b/Source/Core/VideoCommon/GXPipelineTypes.h index d7cd1faa35..388551e767 100644 --- a/Source/Core/VideoCommon/GXPipelineTypes.h +++ b/Source/Core/VideoCommon/GXPipelineTypes.h @@ -43,7 +43,6 @@ struct GXPipelineUid { return std::memcmp(this, &rhs, sizeof(*this)) == 0; } - bool operator!=(const GXPipelineUid& rhs) const { return !operator==(rhs); } }; struct GXUberPipelineUid { @@ -64,7 +63,6 @@ struct GXUberPipelineUid { return std::memcmp(this, &rhs, sizeof(*this)) == 0; } - bool operator!=(const GXUberPipelineUid& rhs) const { return !operator==(rhs); } }; // Disk cache of pipeline UIDs. We can't use the whole UID as a type as it contains pointers. diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp index 5921c4a3e5..9325c7649e 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.cpp @@ -15,8 +15,3 @@ bool FBInfo::operator==(const FBInfo& other) const return m_height == other.m_height && m_width == other.m_width && m_texture_format == other.m_texture_format; } - -bool FBInfo::operator!=(const FBInfo& other) const -{ - return !(*this == other); -} diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.h b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.h index 48106e3a2a..d4ab5b3d1c 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.h +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/FBInfo.h @@ -13,7 +13,6 @@ struct FBInfo TextureFormat m_texture_format = TextureFormat::I4; u32 CalculateHash() const; bool operator==(const FBInfo& other) const; - bool operator!=(const FBInfo& other) const; }; struct FBInfoHasher diff --git a/Source/Core/VideoCommon/RenderState.h b/Source/Core/VideoCommon/RenderState.h index 4a682b1a0f..60dc20d6e4 100644 --- a/Source/Core/VideoCommon/RenderState.h +++ b/Source/Core/VideoCommon/RenderState.h @@ -47,7 +47,6 @@ union RasterizationState } bool operator==(const RasterizationState& rhs) const { return hex == rhs.hex; } - bool operator!=(const RasterizationState& rhs) const { return !operator==(rhs); } bool operator<(const RasterizationState& rhs) const { return hex < rhs.hex; } BitField<0, 2, CullMode> cullmode; @@ -73,7 +72,6 @@ union FramebufferState } bool operator==(const FramebufferState& rhs) const { return hex == rhs.hex; } - bool operator!=(const FramebufferState& rhs) const { return !operator==(rhs); } BitField<0, 8, AbstractTextureFormat> color_texture_format; BitField<8, 8, AbstractTextureFormat> depth_texture_format; @@ -108,7 +106,6 @@ union DepthState } bool operator==(const DepthState& rhs) const { return hex == rhs.hex; } - bool operator!=(const DepthState& rhs) const { return !operator==(rhs); } bool operator<(const DepthState& rhs) const { return hex < rhs.hex; } BitField<0, 1, u32> testenable; @@ -143,7 +140,6 @@ union BlendingState } bool operator==(const BlendingState& rhs) const { return hex == rhs.hex; } - bool operator!=(const BlendingState& rhs) const { return !operator==(rhs); } bool operator<(const BlendingState& rhs) const { return hex < rhs.hex; } BitField<0, 1, u32> blendenable; @@ -185,7 +181,6 @@ struct SamplerState } bool operator==(const SamplerState& rhs) const { return Hex() == rhs.Hex(); } - bool operator!=(const SamplerState& rhs) const { return !operator==(rhs); } bool operator<(const SamplerState& rhs) const { return Hex() < rhs.Hex(); } constexpr u64 Hex() const { return tm0.hex | (static_cast<u64>(tm1.hex) << 32); } diff --git a/Source/Core/VideoCommon/ShaderGenCommon.h b/Source/Core/VideoCommon/ShaderGenCommon.h index 48f3d3d9bc..6ec00331e6 100644 --- a/Source/Core/VideoCommon/ShaderGenCommon.h +++ b/Source/Core/VideoCommon/ShaderGenCommon.h @@ -80,8 +80,6 @@ public: return memcmp(GetUidData(), obj.GetUidData(), GetUidDataSize()) == 0; } - bool operator!=(const ShaderUid& obj) const { return !operator==(obj); } - // determines the storage order inside STL containers bool operator<(const ShaderUid& obj) const { diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 1a06fa671a..532feaca7d 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -63,7 +63,6 @@ struct TextureAndTLUTFormat return texfmt == other.texfmt; } - bool operator!=(const TextureAndTLUTFormat& other) const { return !operator==(other); } TextureFormat texfmt; TLUTFormat tlutfmt; }; diff --git a/Source/Core/VideoCommon/TextureConfig.cpp b/Source/Core/VideoCommon/TextureConfig.cpp index 3d25eac017..dd1c3b9914 100644 --- a/Source/Core/VideoCommon/TextureConfig.cpp +++ b/Source/Core/VideoCommon/TextureConfig.cpp @@ -13,11 +13,6 @@ bool TextureConfig::operator==(const TextureConfig& o) const std::tie(o.width, o.height, o.levels, o.layers, o.samples, o.format, o.flags, o.type); } -bool TextureConfig::operator!=(const TextureConfig& o) const -{ - return !operator==(o); -} - MathUtil::Rectangle<int> TextureConfig::GetRect() const { return {0, 0, static_cast<int>(width), static_cast<int>(height)}; diff --git a/Source/Core/VideoCommon/TextureConfig.h b/Source/Core/VideoCommon/TextureConfig.h index 4e3976f938..e53245777a 100644 --- a/Source/Core/VideoCommon/TextureConfig.h +++ b/Source/Core/VideoCommon/TextureConfig.h @@ -59,7 +59,6 @@ struct TextureConfig } bool operator==(const TextureConfig& o) const; - bool operator!=(const TextureConfig& o) const; MathUtil::Rectangle<int> GetRect() const; MathUtil::Rectangle<int> GetMipRect(u32 level) const; size_t GetStride() const; |
