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.
This commit is contained in:
parent
31e6e58101
commit
b944edc85d
|
@ -24,11 +24,11 @@ template <typename T>
|
||||||
concept KPriorityQueueAffinityMask = !std::is_reference_v<T> && requires(T & t) {
|
concept KPriorityQueueAffinityMask = !std::is_reference_v<T> && requires(T & t) {
|
||||||
{ t.GetAffinityMask() }
|
{ t.GetAffinityMask() }
|
||||||
->Common::ConvertibleTo<u64>;
|
->Common::ConvertibleTo<u64>;
|
||||||
{t.SetAffinityMask(std::declval<u64>())};
|
{t.SetAffinityMask(0)};
|
||||||
|
|
||||||
{ t.GetAffinity(std::declval<int32_t>()) }
|
{ t.GetAffinity(0) }
|
||||||
->std::same_as<bool>;
|
->std::same_as<bool>;
|
||||||
{t.SetAffinity(std::declval<int32_t>(), std::declval<bool>())};
|
{t.SetAffinity(0, false)};
|
||||||
{t.SetAll()};
|
{t.SetAll()};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@ concept KPriorityQueueMember = !std::is_reference_v<T> && requires(T & t) {
|
||||||
->std::same_as<T*>;
|
->std::same_as<T*>;
|
||||||
{ (typename T::QueueEntry()).GetPrev() }
|
{ (typename T::QueueEntry()).GetPrev() }
|
||||||
->std::same_as<T*>;
|
->std::same_as<T*>;
|
||||||
{ t.GetPriorityQueueEntry(std::declval<s32>()) }
|
{ t.GetPriorityQueueEntry(0) }
|
||||||
->std::same_as<typename T::QueueEntry&>;
|
->std::same_as<typename T::QueueEntry&>;
|
||||||
|
|
||||||
{t.GetAffinityMask()};
|
{t.GetAffinityMask()};
|
||||||
{ typename std::remove_cvref<decltype(t.GetAffinityMask())>::type() }
|
{ std::remove_cvref_t<decltype(t.GetAffinityMask())>() }
|
||||||
->KPriorityQueueAffinityMask;
|
->KPriorityQueueAffinityMask;
|
||||||
|
|
||||||
{ t.GetActiveCore() }
|
{ t.GetActiveCore() }
|
||||||
|
|
Reference in New Issue