From 047e169f3ef990d8373a4b7f7c3cb1b24aed4baa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 3 Dec 2021 08:17:32 +0100 Subject: [PATCH] util/BindMethod: merge MakeBind{Method,Function}Wrapper(), they are identical now --- src/util/BindMethod.hxx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/util/BindMethod.hxx b/src/util/BindMethod.hxx index 544f735c8..6352660d5 100644 --- a/src/util/BindMethod.hxx +++ b/src/util/BindMethod.hxx @@ -140,18 +140,11 @@ struct WrapperGenerator { template typename SignatureHelper::function_pointer -MakeBindMethodWrapper() noexcept +MakeWrapperFunction() noexcept { return WrapperGenerator::Invoke; } -template -typename SignatureHelper::function_pointer -MakeBindFunctionWrapper() noexcept -{ - return WrapperGenerator::Invoke; -} - } /* namespace BindMethodDetail */ /** @@ -168,7 +161,7 @@ BindMethod(typename BindMethodDetail::SignatureHelper::class_t using plain_signature = typename H::plain_signature; return BoundMethod{ &instance, - BindMethodDetail::MakeBindMethodWrapper(), + BindMethodDetail::MakeWrapperFunction(), }; } @@ -198,7 +191,7 @@ BindFunction() noexcept using plain_signature = typename H::plain_signature; return BoundMethod{ nullptr, - BindMethodDetail::MakeBindFunctionWrapper(), + BindMethodDetail::MakeWrapperFunction(), }; }