diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-12-24 19:30:07 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-04-25 14:07:57 +0200 |
commit | f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb (patch) | |
tree | 9a89f82fd9ac54d69bf7c4a2412689fe816aba41 /src/core/hle/service/mii/mii_manager.h | |
parent | mii: Implement IDatabaseService commands using MiiManager (diff) | |
download | yuzu-f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb.tar yuzu-f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb.tar.gz yuzu-f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb.tar.bz2 yuzu-f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb.tar.lz yuzu-f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb.tar.xz yuzu-f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb.tar.zst yuzu-f0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb.zip |
Diffstat (limited to 'src/core/hle/service/mii/mii_manager.h')
-rw-r--r-- | src/core/hle/service/mii/mii_manager.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/service/mii/mii_manager.h b/src/core/hle/service/mii/mii_manager.h index 069247cb6..f7e3d2cf9 100644 --- a/src/core/hle/service/mii/mii_manager.h +++ b/src/core/hle/service/mii/mii_manager.h @@ -84,6 +84,8 @@ struct MiiInfo { std::u16string Name() const; }; static_assert(sizeof(MiiInfo) == 0x58, "MiiInfo has incorrect size."); +static_assert(std::has_unique_object_representations_v<MiiInfo>, + "All bits of MiiInfo must contribute to its value."); bool operator==(const MiiInfo& lhs, const MiiInfo& rhs); bool operator!=(const MiiInfo& lhs, const MiiInfo& rhs); @@ -238,15 +240,19 @@ public: bool Remove(Common::UUID uuid); u32 IndexOf(Common::UUID uuid) const; - u32 IndexOf(MiiInfo info) const; + u32 IndexOf(const MiiInfo& info) const; bool Move(Common::UUID uuid, u32 new_index); - bool AddOrReplace(MiiStoreData data); + bool AddOrReplace(const MiiStoreData& data); private: void WriteToFile(); void ReadFromFile(); + MiiStoreData CreateMiiWithUniqueUUID() const; + + void EnsureDatabasePartition(); + MiiDatabase database; }; |