diff options
| author | Mat M <mathew1800@gmail.com> | 2019-05-30 18:00:43 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-30 18:00:43 -0400 |
| commit | 8046f40784ac740b046b59f658aabb82edfdcc76 (patch) | |
| tree | fe6b2e9571e946eee096f374cfd01605cb3cf879 /Source | |
| parent | 00ecfb3c598ec08e5863db9c697e91ab5a4965bf (diff) | |
| parent | cd3ba570dff5ed2ea2c6a95fe72ea0680b24139f (diff) | |
Merge pull request #8145 from Techjar/shaderuid-memcmp-fix
VideoCommon/ShaderGenCommon: Fix memcmp size in ShaderUid operators
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/VideoCommon/ShaderGenCommon.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/ShaderGenCommon.h b/Source/Core/VideoCommon/ShaderGenCommon.h index de6e74e8d3..12fa76fb72 100644 --- a/Source/Core/VideoCommon/ShaderGenCommon.h +++ b/Source/Core/VideoCommon/ShaderGenCommon.h @@ -69,7 +69,7 @@ public: 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); } @@ -77,7 +77,7 @@ public: // 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. |
