From be1954e04cb5a0c3a526f78ed5490a5e65310280 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 15 Oct 2020 14:49:45 -0400 Subject: core: Fix clang build Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795 --- src/core/hle/service/acc/profile_manager.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/acc') diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 9b829e957..9c302043a 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp @@ -41,12 +41,15 @@ constexpr char ACC_SAVE_AVATORS_BASE_PATH[] = "/system/save/8000000000000010/su/ ProfileManager::ProfileManager() { ParseUserSaveFile(); - if (user_count == 0) + if (user_count == 0) { CreateNewUser(UUID::Generate(), "yuzu"); + } - auto current = std::clamp(Settings::values.current_user, 0, MAX_USERS - 1); - if (UserExistsIndex(current)) + auto current = static_cast( + std::clamp(Settings::values.current_user, 0, static_cast(MAX_USERS - 1))); + if (UserExistsIndex(current)) { current = 0; + } OpenUser(*GetUser(current)); } @@ -189,8 +192,8 @@ std::size_t ProfileManager::GetUserCount() const { /// booting std::size_t ProfileManager::GetOpenUserCount() const { - return std::count_if(profiles.begin(), profiles.end(), - [](const ProfileInfo& p) { return p.is_open; }); + return static_cast(std::count_if(profiles.begin(), profiles.end(), + [](const ProfileInfo& p) { return p.is_open; })); } /// Checks if a user id exists in our profile manager -- cgit v1.2.3