general: Rename NewUUID to UUID, and remove the previous UUID impl
This completes the removal of the old UUID implementation.
This commit is contained in:
parent
dfe11d72e3
commit
25db62ce15
41 changed files with 415 additions and 598 deletions
|
@ -131,8 +131,7 @@ T GetRandomValue(T max) {
|
|||
return GetRandomValue<T>({}, max);
|
||||
}
|
||||
|
||||
MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race,
|
||||
const Common::NewUUID& user_id) {
|
||||
MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race, const Common::UUID& user_id) {
|
||||
MiiStoreBitFields bf{};
|
||||
|
||||
if (gender == Gender::All) {
|
||||
|
@ -311,7 +310,7 @@ MiiStoreData BuildRandomStoreData(Age age, Gender gender, Race race,
|
|||
return {DefaultMiiName, bf, user_id};
|
||||
}
|
||||
|
||||
MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::NewUUID& user_id) {
|
||||
MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::UUID& user_id) {
|
||||
MiiStoreBitFields bf{};
|
||||
|
||||
bf.font_region.Assign(info.font_region);
|
||||
|
@ -372,13 +371,13 @@ MiiStoreData BuildDefaultStoreData(const DefaultMii& info, const Common::NewUUID
|
|||
MiiStoreData::MiiStoreData() = default;
|
||||
|
||||
MiiStoreData::MiiStoreData(const MiiStoreData::Name& name, const MiiStoreBitFields& bit_fields,
|
||||
const Common::NewUUID& user_id) {
|
||||
const Common::UUID& user_id) {
|
||||
data.name = name;
|
||||
data.uuid = Common::NewUUID::MakeRandomRFC4122V4();
|
||||
data.uuid = Common::UUID::MakeRandomRFC4122V4();
|
||||
|
||||
std::memcpy(data.data.data(), &bit_fields, sizeof(MiiStoreBitFields));
|
||||
data_crc = GenerateCrc16(data.data.data(), sizeof(data));
|
||||
device_crc = GenerateCrc16(&user_id, sizeof(Common::NewUUID));
|
||||
device_crc = GenerateCrc16(&user_id, sizeof(Common::UUID));
|
||||
}
|
||||
|
||||
MiiManager::MiiManager() : user_id{Service::Account::ProfileManager().GetLastOpenedUser()} {}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <vector>
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/new_uuid.h"
|
||||
#include "common/uuid.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/mii/types.h"
|
||||
|
||||
|
@ -29,7 +29,7 @@ enum class SourceFlag : u32 {
|
|||
DECLARE_ENUM_FLAG_OPERATORS(SourceFlag);
|
||||
|
||||
struct MiiInfo {
|
||||
Common::NewUUID uuid;
|
||||
Common::UUID uuid;
|
||||
std::array<char16_t, 11> name;
|
||||
u8 font_region;
|
||||
u8 favorite_color;
|
||||
|
@ -192,7 +192,7 @@ struct MiiStoreData {
|
|||
|
||||
MiiStoreData();
|
||||
MiiStoreData(const Name& name, const MiiStoreBitFields& bit_fields,
|
||||
const Common::NewUUID& user_id);
|
||||
const Common::UUID& user_id);
|
||||
|
||||
// This corresponds to the above structure MiiStoreBitFields. I did it like this because the
|
||||
// BitField<> type makes this (and any thing that contains it) not trivially copyable, which is
|
||||
|
@ -202,7 +202,7 @@ struct MiiStoreData {
|
|||
static_assert(sizeof(MiiStoreBitFields) == sizeof(data), "data field has incorrect size.");
|
||||
|
||||
Name name{};
|
||||
Common::NewUUID uuid{};
|
||||
Common::UUID uuid{};
|
||||
} data;
|
||||
|
||||
u16 data_crc{};
|
||||
|
@ -326,7 +326,7 @@ public:
|
|||
ResultCode GetIndex(const MiiInfo& info, u32& index);
|
||||
|
||||
private:
|
||||
const Common::NewUUID user_id{};
|
||||
const Common::UUID user_id{};
|
||||
u64 update_counter{};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue