Fixup ::as_rvalue
This commit is contained in:
+2
-14
@@ -168,21 +168,9 @@ template <std::size_t N>
|
|||||||
using get_sint_t = typename get_int_impl<N>::stype;
|
using get_sint_t = typename get_int_impl<N>::stype;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T as_rvalue(T&& obj)
|
std::remove_reference_t<T> as_rvalue(T&& obj)
|
||||||
{
|
{
|
||||||
return obj;
|
return std::forward<T>(obj);
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
T as_rvalue(const T& obj)
|
|
||||||
{
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
T as_rvalue(const volatile T& obj)
|
|
||||||
{
|
|
||||||
return obj;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Formatting helper, type-specific preprocessing for improving safety and functionality
|
// 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)
|
for (u32 d : words)
|
||||||
c->dd(d);
|
c->dd(d);
|
||||||
|
|
||||||
for (auto&& work : decltype(consts)(std::move(consts)))
|
for (auto&& work : ::as_rvalue(std::move(consts)))
|
||||||
{
|
{
|
||||||
work();
|
work();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user