From 66596c5176a9dc0ba7f20a94454e4007d63f1145 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 30 May 2019 10:27:26 -0400 Subject: [PATCH] Common/x64Emitter: Resolve TODO in OpArg's operator== We now require C++17, so we can use std::tie here. --- Source/Core/Common/x64Emitter.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h index 4b16fada91..314f263012 100644 --- a/Source/Core/Common/x64Emitter.h +++ b/Source/Core/Common/x64Emitter.h @@ -120,10 +120,8 @@ struct OpArg } constexpr bool operator==(const OpArg& b) const { - // 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; + return std::tie(scale, offsetOrBaseReg, indexReg, offset, operandReg) == + std::tie(b.scale, b.offsetOrBaseReg, b.indexReg, b.offset, b.operandReg); } constexpr bool operator!=(const OpArg& b) const { return !operator==(b); } u64 Imm64() const