From 40314cc58646e9e91e961e0d82b7d1b53bd839a0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 22 Sep 2021 17:52:37 -0400 Subject: common/uuid: Add validity checking functions to interface Given we have a function to invalidate, we should also have ones to query the validity. Also makes the code more straightforward to read. --- src/core/hle/service/acc/acc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/hle/service/acc/acc.cpp') diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 6d9ec0a8a..689b36056 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -929,8 +929,7 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex } const auto user_list = profile_manager->GetAllUsers(); - if (std::all_of(user_list.begin(), user_list.end(), - [](const auto& user) { return user.uuid == Common::INVALID_UUID; })) { + if (std::ranges::all_of(user_list, [](const auto& user) { return user.IsInvalid(); })) { rb.Push(ResultUnknown); // TODO(ogniK): Find the correct error code rb.PushRaw(Common::INVALID_UUID); return; -- cgit v1.2.3