Skip to content
Permalink
Browse files

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.
  • Loading branch information...
lioncash committed May 30, 2019
1 parent 954246d commit f7eff6dab8a7103a19d6fa57772aab4f448a472d
Showing with 1 addition and 4 deletions.
  1. +1 −4 Source/Core/VideoCommon/ShaderGenCommon.h
@@ -72,10 +72,7 @@ class ShaderUid : public ShaderGeneratorInterface
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

0 comments on commit f7eff6d

Please sign in to comment.
You can’t perform that action at this time.