mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 22:58:50 +00:00
Merge pull request #2697 from endrift/fix-jit-trampoline
Common: CallLambdaTrampoline can return a value
This commit is contained in:
commit
3bbb2ede9c
2 changed files with 4 additions and 6 deletions
|
@ -711,10 +711,9 @@ public:
|
||||||
// (this method might be a thunk in the case of multi-inheritance) so we
|
// (this method might be a thunk in the case of multi-inheritance) so we
|
||||||
// have to go through a trampoline function.
|
// have to go through a trampoline function.
|
||||||
template <typename T, typename... Args>
|
template <typename T, typename... Args>
|
||||||
static void CallLambdaTrampoline(const std::function<T(Args...)>* f,
|
static T CallLambdaTrampoline(const std::function<T(Args...)>* f, Args... args)
|
||||||
Args... args)
|
|
||||||
{
|
{
|
||||||
(*f)(args...);
|
return (*f)(args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function expects you to have set up the state.
|
// This function expects you to have set up the state.
|
||||||
|
|
|
@ -971,10 +971,9 @@ public:
|
||||||
// (this method might be a thunk in the case of multi-inheritance) so we
|
// (this method might be a thunk in the case of multi-inheritance) so we
|
||||||
// have to go through a trampoline function.
|
// have to go through a trampoline function.
|
||||||
template <typename T, typename... Args>
|
template <typename T, typename... Args>
|
||||||
static void CallLambdaTrampoline(const std::function<T(Args...)>* f,
|
static T CallLambdaTrampoline(const std::function<T(Args...)>* f, Args... args)
|
||||||
Args... args)
|
|
||||||
{
|
{
|
||||||
(*f)(args...);
|
return (*f)(args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename... Args>
|
template <typename T, typename... Args>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue