1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-22 20:06:40 +00:00

IPC templating style fix

This commit is contained in:
Michael Scire 2018-04-21 20:38:13 -06:00
parent b81ceeca21
commit 4aa93ad354

View file

@ -388,7 +388,7 @@ struct Encoder<std::tuple<Args...>> {
template<auto IpcCommandImpl, typename Class> template<auto IpcCommandImpl, typename Class>
Result WrapIpcCommandImpl(Class *myfancypointer, IpcParsedCommand& r, IpcCommand &out_command, u8 *pointer_buffer, size_t pointer_buffer_size) { Result WrapIpcCommandImpl(Class *this_ptr, IpcParsedCommand& r, IpcCommand &out_command, u8 *pointer_buffer, size_t pointer_buffer_size) {
using InArgs = typename boost::callable_traits::args_t<decltype(IpcCommandImpl)>; using InArgs = typename boost::callable_traits::args_t<decltype(IpcCommandImpl)>;
using InArgsWithoutThis = typename pop_front<InArgs>::type; using InArgsWithoutThis = typename pop_front<InArgs>::type;
using OutArgs = typename boost::callable_traits::return_type_t<decltype(IpcCommandImpl)>; using OutArgs = typename boost::callable_traits::return_type_t<decltype(IpcCommandImpl)>;
@ -405,7 +405,7 @@ Result WrapIpcCommandImpl(Class *myfancypointer, IpcParsedCommand& r, IpcCommand
} }
auto args = Decoder<OutArgs, InArgsWithoutThis>::Decode(r, out_command, pointer_buffer); auto args = Decoder<OutArgs, InArgsWithoutThis>::Decode(r, out_command, pointer_buffer);
auto result = std::apply( [=](auto&&... args) { return (myfancypointer->*IpcCommandImpl)(args...); }, args); auto result = std::apply( [=](auto&&... args) { return (this_ptr->*IpcCommandImpl)(args...); }, args);
return std::apply(Encoder<OutArgs>{out_command}, result); return std::apply(Encoder<OutArgs>{out_command}, result);
} }