From f7eff6dab8a7103a19d6fa57772aab4f448a472d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 30 May 2019 02:13:37 -0400 Subject: [PATCH] VideoCommon/ShaderGenCommon: Simplify operator!= for ShaderUid This can be implemented as the negation of operator==, placing the comparison logic for equality and inequality in the same place. --- Source/Core/VideoCommon/ShaderGenCommon.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/ShaderGenCommon.h b/Source/Core/VideoCommon/ShaderGenCommon.h index 137b0487dd..de6e74e8d3 100644 --- a/Source/Core/VideoCommon/ShaderGenCommon.h +++ b/Source/Core/VideoCommon/ShaderGenCommon.h @@ -72,10 +72,7 @@ public: return memcmp(&data, &obj.data, data.NumValues() * sizeof(data)) == 0; } - bool operator!=(const ShaderUid& obj) const - { - return memcmp(&data, &obj.data, data.NumValues() * sizeof(data)) != 0; - } + bool operator!=(const ShaderUid& obj) const { return !operator==(obj); } // determines the storage order inside STL containers bool operator<(const ShaderUid& obj) const