Commit 047e169f authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

util/BindMethod: merge MakeBind{Method,Function}Wrapper(), they are identical now

parent 687327c9
......@@ -140,18 +140,11 @@ struct WrapperGenerator<R (*)(Args...) noexcept(NoExcept), function> {
template<auto method>
typename SignatureHelper<decltype(method)>::function_pointer
MakeBindMethodWrapper() noexcept
MakeWrapperFunction() noexcept
{
return WrapperGenerator<decltype(method), method>::Invoke;
}
template<auto function>
typename SignatureHelper<decltype(function)>::function_pointer
MakeBindFunctionWrapper() noexcept
{
return WrapperGenerator<decltype(function), function>::Invoke;
}
} /* namespace BindMethodDetail */
/**
......@@ -168,7 +161,7 @@ BindMethod(typename BindMethodDetail::SignatureHelper<decltype(method)>::class_t
using plain_signature = typename H::plain_signature;
return BoundMethod<plain_signature>{
&instance,
BindMethodDetail::MakeBindMethodWrapper<method>(),
BindMethodDetail::MakeWrapperFunction<method>(),
};
}
......@@ -198,7 +191,7 @@ BindFunction() noexcept
using plain_signature = typename H::plain_signature;
return BoundMethod<plain_signature>{
nullptr,
BindMethodDetail::MakeBindFunctionWrapper<function>(),
BindMethodDetail::MakeWrapperFunction<function>(),
};
}
......
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