diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-06 02:02:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 02:02:13 +0100 |
commit | 3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2 (patch) | |
tree | be7928a0009c8a5b9ee16a7b14cd475fba97ad3c /src/core/hle | |
parent | Merge pull request #5867 from Morph1984/am-GetHealthWarningDisappearedSystemEvent (diff) | |
parent | k_priority_queue: Unfold several declval usages (diff) | |
download | yuzu-3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2.tar yuzu-3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2.tar.gz yuzu-3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2.tar.bz2 yuzu-3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2.tar.lz yuzu-3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2.tar.xz yuzu-3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2.tar.zst yuzu-3a804752cb4c6a9af3f35d8239bb7d12fb9cf9c2.zip |
Diffstat (limited to 'src/core/hle')
-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> concept KPriorityQueueAffinityMask = !std::is_reference_v<T> && requires(T & t) { { t.GetAffinityMask() } ->Common::ConvertibleTo<u64>; - {t.SetAffinityMask(std::declval<u64>())}; + {t.SetAffinityMask(0)}; - { t.GetAffinity(std::declval<int32_t>()) } + { t.GetAffinity(0) } ->std::same_as<bool>; - {t.SetAffinity(std::declval<int32_t>(), std::declval<bool>())}; + {t.SetAffinity(0, false)}; {t.SetAll()}; }; @@ -42,11 +42,11 @@ concept KPriorityQueueMember = !std::is_reference_v<T> && requires(T & t) { ->std::same_as<T*>; { (typename T::QueueEntry()).GetPrev() } ->std::same_as<T*>; - { t.GetPriorityQueueEntry(std::declval<s32>()) } + { t.GetPriorityQueueEntry(0) } ->std::same_as<typename T::QueueEntry&>; {t.GetAffinityMask()}; - { typename std::remove_cvref<decltype(t.GetAffinityMask())>::type() } + { std::remove_cvref_t<decltype(t.GetAffinityMask())>() } ->KPriorityQueueAffinityMask; { t.GetActiveCore() } @@ -55,17 +55,17 @@ concept KPriorityQueueMember = !std::is_reference_v<T> && requires(T & t) { ->Common::ConvertibleTo<s32>; }; -template <typename Member, size_t _NumCores, int LowestPriority, int HighestPriority> +template <typename Member, size_t NumCores_, int LowestPriority, int HighestPriority> requires KPriorityQueueMember<Member> class KPriorityQueue { public: - using AffinityMaskType = typename std::remove_cv_t< - typename std::remove_reference<decltype(std::declval<Member>().GetAffinityMask())>::type>; + using AffinityMaskType = std::remove_cv_t< + std::remove_reference_t<decltype(std::declval<Member>().GetAffinityMask())>>; static_assert(LowestPriority >= 0); static_assert(HighestPriority >= 0); static_assert(LowestPriority >= HighestPriority); static constexpr size_t NumPriority = LowestPriority - HighestPriority + 1; - static constexpr size_t NumCores = _NumCores; + static constexpr size_t NumCores = NumCores_; static constexpr bool IsValidCore(s32 core) { return 0 <= core && core < static_cast<s32>(NumCores); |