diff --git a/src/util/BindMethod.hxx b/src/util/BindMethod.hxx index 5066ece66..2403a3d10 100644 --- a/src/util/BindMethod.hxx +++ b/src/util/BindMethod.hxx @@ -137,28 +137,25 @@ struct MethodWrapperWithSignature { /** * Generate a wrapper function. * - * @param T the containing class * @param method the method pointer - * @param S the plain function signature type */ -template +template struct BindMethodWrapperGenerator; template -struct BindMethodWrapperGenerator { +struct BindMethodWrapperGenerator { static R Invoke(void *_instance, Args... args) noexcept(NoExcept) { auto &t = *(T *)_instance; return (t.*method)(std::forward(args)...); } }; -template::method_pointer method> -typename MethodWrapperWithSignature::function_pointer +template +typename MethodWrapperWithSignature::plain_signature>::function_pointer MakeBindMethodWrapper() noexcept { - return BindMethodWrapperGenerator::Invoke; + return BindMethodWrapperGenerator::Invoke; } /** @@ -222,11 +219,10 @@ constexpr auto BindMethod(typename BindMethodDetail::MethodSignatureHelper::class_type &instance) noexcept { using H = BindMethodDetail::MethodSignatureHelper; - using class_type = typename H::class_type; using plain_signature = typename H::plain_signature; return BoundMethod{ &instance, - BindMethodDetail::MakeBindMethodWrapper(), + BindMethodDetail::MakeBindMethodWrapper(), }; }