Merge pull request #8144 from lioncash/tie

Common/x64Emitter: Resolve TODO in OpArg's operator==
This commit is contained in:
Léo Lam 2019-05-31 11:05:33 +02:00 committed by GitHub
commit 5ffbec6956
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,10 +120,8 @@ struct OpArg
} }
constexpr bool operator==(const OpArg& b) const constexpr bool operator==(const OpArg& b) const
{ {
// TODO: Use std::tie here once Dolphin requires C++17. (We can't do it immediately, return std::tie(scale, offsetOrBaseReg, indexReg, offset, operandReg) ==
// (because we still support some older versions of GCC where std::tie is not constexpr.) std::tie(b.scale, b.offsetOrBaseReg, b.indexReg, b.offset, b.operandReg);
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); } constexpr bool operator!=(const OpArg& b) const { return !operator==(b); }
u64 Imm64() const u64 Imm64() const