Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: ppapi/host/dispatch_host_message.h

Issue 821453003: Update legacy Tuple-using code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: media Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ppapi/host/dispatch_host_message.h
diff --git a/ppapi/host/dispatch_host_message.h b/ppapi/host/dispatch_host_message.h
index 218b8f7b8776f7bb0624f61a63066e1655bc8fe8..80b8a343a7f3e1cbdc748fffc503f0e1295bf44e 100644
--- a/ppapi/host/dispatch_host_message.h
+++ b/ppapi/host/dispatch_host_message.h
@@ -22,43 +22,45 @@ struct HostMessageContext;
template <class ObjT, class Method>
inline int32_t DispatchResourceCall(ObjT* obj, Method method,
HostMessageContext* context,
- Tuple0& arg) {
+ Tuple<>& arg) {
Nico 2014/12/22 17:03:12 can possibly be a variadic template
return (obj->*method)(context);
}
template <class ObjT, class Method, class A>
inline int32_t DispatchResourceCall(ObjT* obj, Method method,
HostMessageContext* context,
- Tuple1<A>& arg) {
- return (obj->*method)(context, arg.a);
+ Tuple<A>& arg) {
+ return (obj->*method)(context, get<0>(arg));
}
template<class ObjT, class Method, class A, class B>
inline int32_t DispatchResourceCall(ObjT* obj, Method method,
HostMessageContext* context,
- Tuple2<A, B>& arg) {
- return (obj->*method)(context, arg.a, arg.b);
+ Tuple<A, B>& arg) {
+ return (obj->*method)(context, get<0>(arg), get<1>(arg));
}
template<class ObjT, class Method, class A, class B, class C>
inline int32_t DispatchResourceCall(ObjT* obj, Method method,
HostMessageContext* context,
- Tuple3<A, B, C>& arg) {
- return (obj->*method)(context, arg.a, arg.b, arg.c);
+ Tuple<A, B, C>& arg) {
+ return (obj->*method)(context, get<0>(arg), get<1>(arg), get<2>(arg));
}
template<class ObjT, class Method, class A, class B, class C, class D>
inline int32_t DispatchResourceCall(ObjT* obj, Method method,
HostMessageContext* context,
- Tuple4<A, B, C, D>& arg) {
- return (obj->*method)(context, arg.a, arg.b, arg.c, arg.d);
+ Tuple<A, B, C, D>& arg) {
+ return (obj->*method)(context, get<0>(arg), get<1>(arg), get<2>(arg),
+ get<3>(arg));
}
template<class ObjT, class Method, class A, class B, class C, class D, class E>
inline int32_t DispatchResourceCall(ObjT* obj, Method method,
HostMessageContext* context,
- Tuple5<A, B, C, D, E>& arg) {
- return (obj->*method)(context, arg.a, arg.b, arg.c, arg.d, arg.e);
+ Tuple<A, B, C, D, E>& arg) {
+ return (obj->*method)(context, get<0>(arg), get<1>(arg), get<2>(arg),
+ get<3>(arg), get<4>(arg));
}
// Note that this only works for message with 1 or more parameters. For

Powered by Google App Engine
This is Rietveld 408576698