mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Merge pull request #8145 from Techjar/shaderuid-memcmp-fix
VideoCommon/ShaderGenCommon: Fix memcmp size in ShaderUid operators
This commit is contained in:
commit
8046f40784
@ -69,7 +69,7 @@ public:
|
|||||||
|
|
||||||
bool operator==(const ShaderUid& obj) const
|
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); }
|
bool operator!=(const ShaderUid& obj) const { return !operator==(obj); }
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
// determines the storage order inside STL containers
|
// determines the storage order inside STL containers
|
||||||
bool operator<(const ShaderUid& obj) const
|
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.
|
// Returns a pointer to an internally stored object of the uid_data type.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user