mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
Remove dumb overloads of atomic_op, fetch_op
And lf_queue::apply. Fix inlining problem by passing F by value.
This commit is contained in:
parent
cf16ee5eb5
commit
4f22559ff0
3 changed files with 28 additions and 104 deletions
|
@ -388,27 +388,13 @@ public:
|
|||
|
||||
// Apply func(data) to each element, return the total length
|
||||
template <typename F>
|
||||
std::size_t apply(F&& func)
|
||||
std::size_t apply(F func)
|
||||
{
|
||||
std::size_t count = 0;
|
||||
|
||||
for (auto slice = pop_all(); slice; slice.pop_front())
|
||||
{
|
||||
std::invoke(std::forward<F>(func), *slice);
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
// apply() overload for callable template argument
|
||||
template <auto F>
|
||||
std::size_t apply()
|
||||
{
|
||||
std::size_t count = 0;
|
||||
|
||||
for (auto slice = pop_all(); slice; slice.pop_front())
|
||||
{
|
||||
std::invoke(F, *slice);
|
||||
std::invoke(func, *slice);
|
||||
}
|
||||
|
||||
return count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue