mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Fixup ::as_rvalue
This commit is contained in:
parent
141d62fbf9
commit
8e61c65c0d
@ -168,21 +168,9 @@ template <std::size_t N>
|
||||
using get_sint_t = typename get_int_impl<N>::stype;
|
||||
|
||||
template <typename T>
|
||||
T as_rvalue(T&& obj)
|
||||
std::remove_reference_t<T> as_rvalue(T&& obj)
|
||||
{
|
||||
return obj;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T as_rvalue(const T& obj)
|
||||
{
|
||||
return obj;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T as_rvalue(const volatile T& obj)
|
||||
{
|
||||
return obj;
|
||||
return std::forward<T>(obj);
|
||||
}
|
||||
|
||||
// Formatting helper, type-specific preprocessing for improving safety and functionality
|
||||
|
@ -881,7 +881,7 @@ spu_function_t spu_recompiler::compile(spu_program&& _func)
|
||||
for (u32 d : words)
|
||||
c->dd(d);
|
||||
|
||||
for (auto&& work : decltype(consts)(std::move(consts)))
|
||||
for (auto&& work : ::as_rvalue(std::move(consts)))
|
||||
{
|
||||
work();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user