Merge pull request #9949 from JosJuice/wia-ice-3
DiscIO: Fix broken workaround for MSVC ARM64 ICE
This commit is contained in:
commit
55a465c6e6
|
@ -240,22 +240,26 @@ private:
|
||||||
|
|
||||||
struct ReuseID
|
struct ReuseID
|
||||||
{
|
{
|
||||||
// This is a workaround for an ICE in Visual Studio 16.10.0 when making an ARM64 Release build.
|
// This code is a workaround for an ICE in Visual Studio 16.10.0 when making an ARM64 Release
|
||||||
// Once the ICE has been fixed upstream, we can move partition_key inside the tie.
|
// build. Once a fixed version of Visual Studio is released, we can use std::tie instead.
|
||||||
#define COMPARE_TIED(op) \
|
#define COMPARE_REUSE_ID_INNER(op, f, next) ((f != other.f) ? (f op other.f) : (next))
|
||||||
(partition_key op other.partition_key) && \
|
#define COMPARE_REUSE_ID(op, equal_result) \
|
||||||
std::tie(data_size, encrypted, value) \
|
COMPARE_REUSE_ID_INNER( \
|
||||||
op std::tie(other.data_size, other.encrypted, other.value)
|
op, partition_key, \
|
||||||
|
COMPARE_REUSE_ID_INNER( \
|
||||||
|
op, data_size, \
|
||||||
|
COMPARE_REUSE_ID_INNER(op, encrypted, COMPARE_REUSE_ID_INNER(op, value, equal_result))))
|
||||||
|
|
||||||
bool operator==(const ReuseID& other) const { return COMPARE_TIED(==); }
|
bool operator==(const ReuseID& other) const { return COMPARE_REUSE_ID(==, true); }
|
||||||
bool operator<(const ReuseID& other) const { return COMPARE_TIED(<); }
|
bool operator<(const ReuseID& other) const { return COMPARE_REUSE_ID(<, false); }
|
||||||
bool operator>(const ReuseID& other) const { return COMPARE_TIED(>); }
|
bool operator>(const ReuseID& other) const { return COMPARE_REUSE_ID(>, false); }
|
||||||
|
|
||||||
bool operator!=(const ReuseID& other) const { return !operator==(other); }
|
bool operator!=(const ReuseID& other) const { return !operator==(other); }
|
||||||
bool operator>=(const ReuseID& other) const { return !operator<(other); }
|
bool operator>=(const ReuseID& other) const { return !operator<(other); }
|
||||||
bool operator<=(const ReuseID& other) const { return !operator>(other); }
|
bool operator<=(const ReuseID& other) const { return !operator>(other); }
|
||||||
|
|
||||||
#undef COMPARE_TIED
|
#undef COMPARE_REUSE_ID_INNER
|
||||||
|
#undef COMPARE_REUSE_ID
|
||||||
|
|
||||||
WiiKey partition_key;
|
WiiKey partition_key;
|
||||||
u64 data_size;
|
u64 data_size;
|
||||||
|
|
Loading…
Reference in New Issue