summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2018-04-14 20:46:24 +0200
committerJosJuice <josjuice@gmail.com>2018-04-15 08:30:01 +0200
commit8a146d5210b47f768c29927f75159bae58d862f7 (patch)
treeeb91d3c2c14bc6fc23d857af760ed0d73c93088e /Source/Core/Common
parent9d7009796c2e6122a09444fc9a975cd8fecc83be (diff)
x64Emitter: Don't assume that std::tie is constexpr
Using constexpr tie broke building with older GCC versions according to https://forums.dolphin-emu.org/Thread-build-error-on-linux-mint-18-3
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/x64Emitter.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h
index 62811094b5..8eebf2e104 100644
--- a/Source/Core/Common/x64Emitter.h
+++ b/Source/Core/Common/x64Emitter.h
@@ -120,8 +120,10 @@ struct OpArg
}
constexpr bool operator==(const OpArg& b) const
{
- return std::tie(scale, offsetOrBaseReg, indexReg, offset, operandReg) ==
- std::tie(b.scale, b.offsetOrBaseReg, b.indexReg, b.offset, b.operandReg);
+ // TODO: Use std::tie here once Dolphin requires C++17. (We can't do it immediately,
+ // (because we still support some older versions of GCC where std::tie is not constexpr.)
+ return operandReg == b.operandReg && scale == b.scale && offsetOrBaseReg == b.offsetOrBaseReg &&
+ indexReg == b.indexReg && offset == b.offset;
}
constexpr bool operator!=(const OpArg& b) const { return !operator==(b); }
u64 Imm64() const