Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
047e169f
Commit
047e169f
authored
Dec 03, 2021
by
Max Kellermann
Committed by
Max Kellermann
Dec 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
util/BindMethod: merge MakeBind{Method,Function}Wrapper(), they are identical now
parent
687327c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
BindMethod.hxx
src/util/BindMethod.hxx
+3
-10
No files found.
src/util/BindMethod.hxx
View file @
047e169f
...
@@ -140,18 +140,11 @@ struct WrapperGenerator<R (*)(Args...) noexcept(NoExcept), function> {
...
@@ -140,18 +140,11 @@ struct WrapperGenerator<R (*)(Args...) noexcept(NoExcept), function> {
template
<
auto
method
>
template
<
auto
method
>
typename
SignatureHelper
<
decltype
(
method
)
>::
function_pointer
typename
SignatureHelper
<
decltype
(
method
)
>::
function_pointer
Make
BindMethodWrapper
()
noexcept
Make
WrapperFunction
()
noexcept
{
{
return
WrapperGenerator
<
decltype
(
method
),
method
>::
Invoke
;
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 */
}
/* namespace BindMethodDetail */
/**
/**
...
@@ -168,7 +161,7 @@ BindMethod(typename BindMethodDetail::SignatureHelper<decltype(method)>::class_t
...
@@ -168,7 +161,7 @@ BindMethod(typename BindMethodDetail::SignatureHelper<decltype(method)>::class_t
using
plain_signature
=
typename
H
::
plain_signature
;
using
plain_signature
=
typename
H
::
plain_signature
;
return
BoundMethod
<
plain_signature
>
{
return
BoundMethod
<
plain_signature
>
{
&
instance
,
&
instance
,
BindMethodDetail
::
Make
BindMethodWrapper
<
method
>
(),
BindMethodDetail
::
Make
WrapperFunction
<
method
>
(),
};
};
}
}
...
@@ -198,7 +191,7 @@ BindFunction() noexcept
...
@@ -198,7 +191,7 @@ BindFunction() noexcept
using
plain_signature
=
typename
H
::
plain_signature
;
using
plain_signature
=
typename
H
::
plain_signature
;
return
BoundMethod
<
plain_signature
>
{
return
BoundMethod
<
plain_signature
>
{
nullptr
,
nullptr
,
BindMethodDetail
::
Make
BindFunctionWrapper
<
function
>
(),
BindMethodDetail
::
Make
WrapperFunction
<
function
>
(),
};
};
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment