diff options
| -rw-r--r-- | src/core/hle/kernel/k_priority_queue.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/hle/kernel/k_priority_queue.h b/src/core/hle/kernel/k_priority_queue.h index 13d628b85..4aa669d95 100644 --- a/src/core/hle/kernel/k_priority_queue.h +++ b/src/core/hle/kernel/k_priority_queue.h | |||
| @@ -24,11 +24,11 @@ template <typename T> | |||
| 24 | concept KPriorityQueueAffinityMask = !std::is_reference_v<T> && requires(T & t) { | 24 | concept KPriorityQueueAffinityMask = !std::is_reference_v<T> && requires(T & t) { |
| 25 | { t.GetAffinityMask() } | 25 | { t.GetAffinityMask() } |
| 26 | ->Common::ConvertibleTo<u64>; | 26 | ->Common::ConvertibleTo<u64>; |
| 27 | {t.SetAffinityMask(std::declval<u64>())}; | 27 | {t.SetAffinityMask(0)}; |
| 28 | 28 | ||
| 29 | { t.GetAffinity(std::declval<int32_t>()) } | 29 | { t.GetAffinity(0) } |
| 30 | ->std::same_as<bool>; | 30 | ->std::same_as<bool>; |
| 31 | {t.SetAffinity(std::declval<int32_t>(), std::declval<bool>())}; | 31 | {t.SetAffinity(0, false)}; |
| 32 | {t.SetAll()}; | 32 | {t.SetAll()}; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| @@ -42,11 +42,11 @@ concept KPriorityQueueMember = !std::is_reference_v<T> && requires(T & t) { | |||
| 42 | ->std::same_as<T*>; | 42 | ->std::same_as<T*>; |
| 43 | { (typename T::QueueEntry()).GetPrev() } | 43 | { (typename T::QueueEntry()).GetPrev() } |
| 44 | ->std::same_as<T*>; | 44 | ->std::same_as<T*>; |
| 45 | { t.GetPriorityQueueEntry(std::declval<s32>()) } | 45 | { t.GetPriorityQueueEntry(0) } |
| 46 | ->std::same_as<typename T::QueueEntry&>; | 46 | ->std::same_as<typename T::QueueEntry&>; |
| 47 | 47 | ||
| 48 | {t.GetAffinityMask()}; | 48 | {t.GetAffinityMask()}; |
| 49 | { typename std::remove_cvref<decltype(t.GetAffinityMask())>::type() } | 49 | { std::remove_cvref_t<decltype(t.GetAffinityMask())>() } |
| 50 | ->KPriorityQueueAffinityMask; | 50 | ->KPriorityQueueAffinityMask; |
| 51 | 51 | ||
| 52 | { t.GetActiveCore() } | 52 | { t.GetActiveCore() } |
| @@ -55,17 +55,17 @@ concept KPriorityQueueMember = !std::is_reference_v<T> && requires(T & t) { | |||
| 55 | ->Common::ConvertibleTo<s32>; | 55 | ->Common::ConvertibleTo<s32>; |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| 58 | template <typename Member, size_t _NumCores, int LowestPriority, int HighestPriority> | 58 | template <typename Member, size_t NumCores_, int LowestPriority, int HighestPriority> |
| 59 | requires KPriorityQueueMember<Member> class KPriorityQueue { | 59 | requires KPriorityQueueMember<Member> class KPriorityQueue { |
| 60 | public: | 60 | public: |
| 61 | using AffinityMaskType = typename std::remove_cv_t< | 61 | using AffinityMaskType = std::remove_cv_t< |
| 62 | typename std::remove_reference<decltype(std::declval<Member>().GetAffinityMask())>::type>; | 62 | std::remove_reference_t<decltype(std::declval<Member>().GetAffinityMask())>>; |
| 63 | 63 | ||
| 64 | static_assert(LowestPriority >= 0); | 64 | static_assert(LowestPriority >= 0); |
| 65 | static_assert(HighestPriority >= 0); | 65 | static_assert(HighestPriority >= 0); |
| 66 | static_assert(LowestPriority >= HighestPriority); | 66 | static_assert(LowestPriority >= HighestPriority); |
| 67 | static constexpr size_t NumPriority = LowestPriority - HighestPriority + 1; | 67 | static constexpr size_t NumPriority = LowestPriority - HighestPriority + 1; |
| 68 | static constexpr size_t NumCores = _NumCores; | 68 | static constexpr size_t NumCores = NumCores_; |
| 69 | 69 | ||
| 70 | static constexpr bool IsValidCore(s32 core) { | 70 | static constexpr bool IsValidCore(s32 core) { |
| 71 | return 0 <= core && core < static_cast<s32>(NumCores); | 71 | return 0 <= core && core < static_cast<s32>(NumCores); |