Merge pull request #12396 from lioncash/opeq

Core/SyncIdentifier: Default operator==
This commit is contained in:
Admiral H. Curtiss 2023-12-12 03:42:18 +01:00 committed by GitHub
commit 9326186d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -5,7 +5,6 @@
#include <array> #include <array>
#include <string> #include <string>
#include <tuple>
#include "Common/CommonTypes.h" #include "Common/CommonTypes.h"
@ -26,12 +25,7 @@ struct SyncIdentifier
// The way the hash is calculated may change with updates to Dolphin. // The way the hash is calculated may change with updates to Dolphin.
std::array<u8, 20> sync_hash{}; std::array<u8, 20> sync_hash{};
bool operator==(const SyncIdentifier& s) const bool operator==(const SyncIdentifier&) const = default;
{
return std::tie(dol_elf_size, game_id, revision, disc_number, is_datel, sync_hash) ==
std::tie(s.dol_elf_size, s.game_id, s.revision, s.disc_number, s.is_datel, s.sync_hash);
}
bool operator!=(const SyncIdentifier& s) const { return !operator==(s); }
}; };
// The order of entries in this enum matters, as the lowest value is // The order of entries in this enum matters, as the lowest value is