summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/acc
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-01-20 04:45:05 +0100
committerGitHub <noreply@github.com>2020-01-20 04:45:05 +0100
commit8b9f433d9510b4a02f432c2fdb1eded323ddff25 (patch)
tree90f30f2c4a0fd05789b56a624ada99ed069f3d2c /src/core/hle/service/acc
parentMerge pull request #3313 from ReinUsesLisp/vk-rasterizer (diff)
parentservice: time: Implement GetStandardLocalSystemClock. (diff)
downloadyuzu-8b9f433d9510b4a02f432c2fdb1eded323ddff25.tar
yuzu-8b9f433d9510b4a02f432c2fdb1eded323ddff25.tar.gz
yuzu-8b9f433d9510b4a02f432c2fdb1eded323ddff25.tar.bz2
yuzu-8b9f433d9510b4a02f432c2fdb1eded323ddff25.tar.lz
yuzu-8b9f433d9510b4a02f432c2fdb1eded323ddff25.tar.xz
yuzu-8b9f433d9510b4a02f432c2fdb1eded323ddff25.tar.zst
yuzu-8b9f433d9510b4a02f432c2fdb1eded323ddff25.zip
Diffstat (limited to 'src/core/hle/service/acc')
-rw-r--r--src/core/hle/service/acc/acc.cpp2
-rw-r--r--src/core/hle/service/acc/profile_manager.cpp14
-rw-r--r--src/core/hle/service/acc/profile_manager.h27
3 files changed, 22 insertions, 21 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 7e3e311fb..cfac8ca9a 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -211,7 +211,7 @@ protected:
}
ProfileManager& profile_manager;
- Common::UUID user_id; ///< The user id this profile refers to.
+ Common::UUID user_id{Common::INVALID_UUID}; ///< The user id this profile refers to.
};
class IProfile final : public IProfileCommon {
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp
index 3e756e59e..eb8c81645 100644
--- a/src/core/hle/service/acc/profile_manager.cpp
+++ b/src/core/hle/service/acc/profile_manager.cpp
@@ -16,17 +16,17 @@ namespace Service::Account {
using Common::UUID;
struct UserRaw {
- UUID uuid;
- UUID uuid2;
- u64 timestamp;
- ProfileUsername username;
- ProfileData extra_data;
+ UUID uuid{Common::INVALID_UUID};
+ UUID uuid2{Common::INVALID_UUID};
+ u64 timestamp{};
+ ProfileUsername username{};
+ ProfileData extra_data{};
};
static_assert(sizeof(UserRaw) == 0xC8, "UserRaw has incorrect size.");
struct ProfileDataRaw {
INSERT_PADDING_BYTES(0x10);
- std::array<UserRaw, MAX_USERS> users;
+ std::array<UserRaw, MAX_USERS> users{};
};
static_assert(sizeof(ProfileDataRaw) == 0x650, "ProfileDataRaw has incorrect size.");
@@ -238,7 +238,7 @@ UserIDArray ProfileManager::GetOpenUsers() const {
std::transform(profiles.begin(), profiles.end(), output.begin(), [](const ProfileInfo& p) {
if (p.is_open)
return p.user_uuid;
- return UUID{};
+ return UUID{Common::INVALID_UUID};
});
std::stable_partition(output.begin(), output.end(), [](const UUID& uuid) { return uuid; });
return output;
diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h
index 5a6d28925..5310637a6 100644
--- a/src/core/hle/service/acc/profile_manager.h
+++ b/src/core/hle/service/acc/profile_manager.h
@@ -13,9 +13,10 @@
#include "core/hle/result.h"
namespace Service::Account {
-constexpr std::size_t MAX_USERS = 8;
-constexpr std::size_t profile_username_size = 32;
+constexpr std::size_t MAX_USERS{8};
+constexpr std::size_t profile_username_size{32};
+
using ProfileUsername = std::array<u8, profile_username_size>;
using UserIDArray = std::array<Common::UUID, MAX_USERS>;
@@ -23,8 +24,8 @@ using UserIDArray = std::array<Common::UUID, MAX_USERS>;
/// TODO: RE this structure
struct ProfileData {
INSERT_PADDING_WORDS(1);
- u32 icon_id;
- u8 bg_color_id;
+ u32 icon_id{};
+ u8 bg_color_id{};
INSERT_PADDING_BYTES(0x7);
INSERT_PADDING_BYTES(0x10);
INSERT_PADDING_BYTES(0x60);
@@ -34,17 +35,17 @@ static_assert(sizeof(ProfileData) == 0x80, "ProfileData structure has incorrect
/// This holds general information about a users profile. This is where we store all the information
/// based on a specific user
struct ProfileInfo {
- Common::UUID user_uuid;
- ProfileUsername username;
- u64 creation_time;
- ProfileData data; // TODO(ognik): Work out what this is
- bool is_open;
+ Common::UUID user_uuid{Common::INVALID_UUID};
+ ProfileUsername username{};
+ u64 creation_time{};
+ ProfileData data{}; // TODO(ognik): Work out what this is
+ bool is_open{};
};
struct ProfileBase {
- Common::UUID user_uuid;
- u64_le timestamp;
- ProfileUsername username;
+ Common::UUID user_uuid{Common::INVALID_UUID};
+ u64_le timestamp{};
+ ProfileUsername username{};
// Zero out all the fields to make the profile slot considered "Empty"
void Invalidate() {
@@ -101,7 +102,7 @@ private:
bool RemoveProfileAtIndex(std::size_t index);
std::array<ProfileInfo, MAX_USERS> profiles{};
- std::size_t user_count = 0;
+ std::size_t user_count{};
Common::UUID last_opened_user{Common::INVALID_UUID};
};