diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-30 16:56:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-30 16:59:09 +0200 |
commit | b705075634d54a57e5edfeae1791869186bf149a (patch) | |
tree | f25a84776e9a8461e69d9ae844b6fcb843bcf37c /include/tools | |
parent | 385a248513da5984d5c05301ae9d50a7876a826f (diff) |
IMPL_LINK_NOARG_TYPED is more useful with a non-void* ArgType
...as it will be used to implement a function that needs to be compatiblie with
some specific Link<Arg,Ret> type.
Change-Id: Ieabd0ee499850a304e0c6e625953532be47ac784
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/link.hxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/include/tools/link.hxx b/include/tools/link.hxx index 3cf09bc80421..55dfbae51887 100644 --- a/include/tools/link.hxx +++ b/include/tools/link.hxx @@ -96,11 +96,11 @@ } \ RetType Class::Member(ArgType ArgName) -#define IMPL_LINK_NOARG_TYPED(Class, Member, RetType) \ - RetType Class::LinkStub##Member(void * instance, void * data) { \ +#define IMPL_LINK_NOARG_TYPED(Class, Member, ArgType, RetType) \ + RetType Class::LinkStub##Member(void * instance, ArgType data) { \ return static_cast<Class *>(instance)->Member(data); \ } \ - RetType Class::Member(SAL_UNUSED_PARAMETER void *) + RetType Class::Member(SAL_UNUSED_PARAMETER ArgType) #define IMPL_STATIC_LINK_TYPED(Class, Member, ArgType, ArgName, RetType) \ RetType Class::LinkStub##Member(void * instance, ArgType data) { \ @@ -115,12 +115,13 @@ } \ RetType Class::Member(SAL_UNUSED_PARAMETER Class *, ArgType ArgName) -#define IMPL_STATIC_LINK_NOINSTANCE_NOARG_TYPED(Class, Member, RetType) \ - RetType Class::LinkStub##Member(void * instance, void * data) { \ +#define IMPL_STATIC_LINK_NOINSTANCE_NOARG_TYPED( \ + Class, Member, ArgType, RetType) \ + RetType Class::LinkStub##Member(void * instance, ArgType data) { \ return Member(static_cast<Class *>(instance), data); \ } \ RetType Class::Member( \ - SAL_UNUSED_PARAMETER Class *, SAL_UNUSED_PARAMETER void *) + SAL_UNUSED_PARAMETER Class *, SAL_UNUSED_PARAMETER ArgType) #define LINK(Instance, Class, Member) ::tools::detail::makeLink( \ static_cast<Class *>(Instance), &Class::LinkStub##Member) |