diff options
| author | 2021-02-04 15:11:19 -0500 | |
|---|---|---|
| committer | 2021-02-04 15:18:58 -0500 | |
| commit | b944edc85d3d017d5cf5da7fdfdf8fafbf5604a3 (patch) | |
| tree | eca41893a6b61938804d1d4e35a26b1e7ef2a436 /src | |
| parent | k_priority_queue: Simplify affinity mask type alias (diff) | |
| download | yuzu-b944edc85d3d017d5cf5da7fdfdf8fafbf5604a3.tar.gz yuzu-b944edc85d3d017d5cf5da7fdfdf8fafbf5604a3.tar.xz yuzu-b944edc85d3d017d5cf5da7fdfdf8fafbf5604a3.zip | |
k_priority_queue: Unfold several declval usages
Given these are only used as function existence checks, we can simplify
some usages of declval, given they aren't particularly useful here.
Reduces a few template instantiations, which at most reduces compile
times a tiny bit.
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/kernel/k_priority_queue.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_priority_queue.h b/src/core/hle/kernel/k_priority_queue.h index 103dafd48..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() } |