diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 09:33:33 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 20:31:19 +0100 |
commit | f8650a9580cf61cf97011511d8a1fd53346ac99c (patch) | |
tree | c9860b9bcbc5b308c806977d603e67d8ae996c14 /src/core/hle/service/acc | |
parent | common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT (diff) | |
download | yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.gz yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.bz2 yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.lz yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.xz yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.zst yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.zip |
Diffstat (limited to 'src/core/hle/service/acc')
-rw-r--r-- | src/core/hle/service/acc/acc.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/service/acc/profile_manager.cpp | 10 | ||||
-rw-r--r-- | src/core/hle/service/acc/profile_manager.h | 18 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 6981f8ee7..bb07f6ccc 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -534,7 +534,7 @@ private: rb.Push(RESULT_SUCCESS); } - Common::UUID user_id; + Common::UUID user_id{Common::INVALID_UUID}; }; // 6.0.0+ diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 9b829e957..d9865d56f 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp @@ -227,17 +227,17 @@ void ProfileManager::CloseUser(UUID uuid) { /// Gets all valid user ids on the system UserIDArray ProfileManager::GetAllUsers() const { - UserIDArray output; - std::transform(profiles.begin(), profiles.end(), output.begin(), - [](const ProfileInfo& p) { return p.user_uuid; }); + UserIDArray output{}; + std::ranges::transform(profiles, output.begin(), + [](const ProfileInfo& p) { return p.user_uuid; }); return output; } /// Get all the open users on the system and zero out the rest of the data. This is specifically /// needed for GetOpenUsers and we need to ensure the rest of the output buffer is zero'd out UserIDArray ProfileManager::GetOpenUsers() const { - UserIDArray output; - std::transform(profiles.begin(), profiles.end(), output.begin(), [](const ProfileInfo& p) { + UserIDArray output{}; + std::ranges::transform(profiles, output.begin(), [](const ProfileInfo& p) { if (p.is_open) return p.user_uuid; return UUID{Common::INVALID_UUID}; diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 5310637a6..71b9d5518 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h @@ -23,12 +23,12 @@ using UserIDArray = std::array<Common::UUID, MAX_USERS>; /// Contains extra data related to a user. /// TODO: RE this structure struct ProfileData { - INSERT_PADDING_WORDS(1); - u32 icon_id{}; - u8 bg_color_id{}; - INSERT_PADDING_BYTES(0x7); - INSERT_PADDING_BYTES(0x10); - INSERT_PADDING_BYTES(0x60); + INSERT_PADDING_WORDS_NOINIT(1); + u32 icon_id; + u8 bg_color_id; + INSERT_PADDING_BYTES_NOINIT(0x7); + INSERT_PADDING_BYTES_NOINIT(0x10); + INSERT_PADDING_BYTES_NOINIT(0x60); }; static_assert(sizeof(ProfileData) == 0x80, "ProfileData structure has incorrect size"); @@ -43,9 +43,9 @@ struct ProfileInfo { }; struct ProfileBase { - Common::UUID user_uuid{Common::INVALID_UUID}; - u64_le timestamp{}; - ProfileUsername username{}; + Common::UUID user_uuid; + u64_le timestamp; + ProfileUsername username; // Zero out all the fields to make the profile slot considered "Empty" void Invalidate() { |