Skip to content
Permalink
Browse files

VideoCommon/ShaderGenCommon: Fix memcmp size in ShaderUid operators

  • Loading branch information...
Techjar committed May 30, 2019
1 parent 00ecfb3 commit cd3ba570dff5ed2ea2c6a95fe72ea0680b24139f
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Core/VideoCommon/ShaderGenCommon.h
@@ -69,15 +69,15 @@ class ShaderUid : public ShaderGeneratorInterface

bool operator==(const ShaderUid& obj) const
{
return memcmp(&data, &obj.data, data.NumValues() * sizeof(data)) == 0;
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
{
return memcmp(&data, &obj.data, data.NumValues() * sizeof(data)) < 0;
return memcmp(GetUidData(), obj.GetUidData(), GetUidDataSize()) < 0;
}

// Returns a pointer to an internally stored object of the uid_data type.

0 comments on commit cd3ba57

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