summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/mii/mii_manager.h
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-12-24 19:30:07 +0100
committerZach Hilman <zachhilman@gmail.com>2019-04-25 14:07:57 +0200
commitf0db2e3ef36a77f2f3eaf2dca15ddfe8851edecb (patch)
tree9a89f82fd9ac54d69bf7c4a2412689fe816aba41 /src/core/hle/service/mii/mii_manager.h
parentmii: Implement IDatabaseService commands using MiiManager (diff)
downloadyuzu-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.h10
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;
};