diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h index a5eb986e2f..899c2dbde6 100644 --- a/Source/Core/Common/Arm64Emitter.h +++ b/Source/Core/Common/Arm64Emitter.h @@ -709,10 +709,9 @@ public: // (this method might be a thunk in the case of multi-inheritance) so we // have to go through a trampoline function. template - static void CallLambdaTrampoline(const std::function* f, - Args... args) + static T CallLambdaTrampoline(const std::function* f, Args... args) { - (*f)(args...); + return (*f)(args...); } // This function expects you to have set up the state. diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h index c62254aec4..627c940cdb 100644 --- a/Source/Core/Common/x64Emitter.h +++ b/Source/Core/Common/x64Emitter.h @@ -964,10 +964,9 @@ public: // (this method might be a thunk in the case of multi-inheritance) so we // have to go through a trampoline function. template - static void CallLambdaTrampoline(const std::function* f, - Args... args) + static T CallLambdaTrampoline(const std::function* f, Args... args) { - (*f)(args...); + return (*f)(args...); } template