Commit cd0a664a authored by mikhail.pozdnyakov's avatar mikhail.pozdnyakov Committed by Commit bot

Simplify IPC::SyncMessageSchema::WriteReplyParams() using variadic templates

Review URL: https://codereview.chromium.org/1036883002

Cr-Commit-Position: refs/heads/master@{#322368}
parent bdc25070
...@@ -906,33 +906,9 @@ class SyncMessageSchema { ...@@ -906,33 +906,9 @@ class SyncMessageSchema {
return ok; return ok;
} }
template<typename TA> template <typename... Ts>
static void WriteReplyParams(Message* reply, TA a) { static void WriteReplyParams(Message* reply, Ts... args) {
ReplyParam p(a); ReplyParam p(args...);
WriteParam(reply, p);
}
template<typename TA, typename TB>
static void WriteReplyParams(Message* reply, TA a, TB b) {
ReplyParam p(a, b);
WriteParam(reply, p);
}
template<typename TA, typename TB, typename TC>
static void WriteReplyParams(Message* reply, TA a, TB b, TC c) {
ReplyParam p(a, b, c);
WriteParam(reply, p);
}
template<typename TA, typename TB, typename TC, typename TD>
static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d) {
ReplyParam p(a, b, c, d);
WriteParam(reply, p);
}
template<typename TA, typename TB, typename TC, typename TD, typename TE>
static void WriteReplyParams(Message* reply, TA a, TB b, TC c, TD d, TE e) {
ReplyParam p(a, b, c, d, e);
WriteParam(reply, p); WriteParam(reply, p);
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment