Commit 6594b7c6 authored by Volker Krause's avatar Volker Krause
Browse files

Remove the method call wrapper specialization for void return types

No longer necessary with how calls are handled meanwhile, and thus avoids
a bunch of duplicated code.
parent fba38f2f
Pipeline #104358 failed with stage
in 1 minute and 50 seconds
......@@ -157,23 +157,6 @@ namespace Internal {
}
};
template <typename ...Sig>
struct invoker<void, Sig...> {
template <typename ...Args>
static void call(QAndroidJniObject handle, const char *name, const char *signature, Args&&... args)
{
static_assert(is_call_compatible<Sig...>::template with<Args...>::value, "incompatible call arguments");
const auto params = std::make_tuple(toCallArgument<Sig, Args>(std::forward<Args>(args))...);
doCall(handle, name, signature, params, std::index_sequence_for<Args...>{});
}
template <typename ParamT, std::size_t ...Index>
static void doCall(QAndroidJniObject handle, const char *name, const char *signature, const ParamT &params, std::index_sequence<Index...>)
{
handle.callMethod<void>(name, signature, toFinalCallArgument(std::get<Index>(params))...);
}
};
template <typename RetT>
struct invoker<RetT> {
static typename Internal::call_return<RetT>::CallReturnT call(QAndroidJniObject handle, const char *name, const char *signature)
......@@ -185,14 +168,6 @@ namespace Internal {
}
}
};
template <>
struct invoker<void> {
static void call(QAndroidJniObject handle, const char *name, const char *signature)
{
handle.callMethod<void>(name, signature);
}
};
}
///@endcond
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment