Consider using C++17 fold expressions to implement variadic Read/WriteParams()
Categories
(Core :: IPC, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: mozbugz, Assigned: nikopacheco22)
Details
Attachments
(1 file, 1 obsolete file)
While passing by, I noticed:
https://searchfox.org/mozilla-central/source/ipc/glue/IPCMessageUtils.h#1265-1283
Variadic functions WriteParams
and ReadParams
are written in the old recursive way: Handle first arg, recurse with the rest.
I think they could benefit from C++17 fold expressions, e.g.:
template <typename... Ts>
static void WriteParams(Message* aMsg, const Ts&... aArgs) {
(WriteParam(aMsg, aArgs), ...);
}
(There may be other places like this in IPC-land? I don't know.)
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 3•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:nikopacheco22, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 4•5 years ago
|
||
Looks like the assignee Nicolas is a relatively new bugzilla user (welcome, & thanks for the patch!)
jld, perhaps you could trigger lando and/or help Nicolas with checkin-needed, if you're still comfortable with the patch landing?
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #4)
Looks like the assignee Nicolas is a relatively new bugzilla user (welcome, & thanks for the patch!)
jld, perhaps you could trigger lando and/or help Nicolas with checkin-needed, if you're still comfortable with the patch landing?
yey, I am new and I am still learning! The bug was accepted and marked as ready to land here https://phabricator.services.mozilla.com/D70431,but I don't know how to continue.
Updated•4 years ago
|
Comment 7•4 years ago
•
|
||
Looks like your nfroyd landed your patch - hooray!
For your next patch -- once it's gotten review and is ready to land, you can add the Check-in Needed
tag on phabricator, as described at https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch#Getting_the_patch_checked_into_the_tree , and someone will come along within a day or so and land the patch for you (after a sanity-check that it has indeed been reviewed).
Comment 8•4 years ago
|
||
bugherder |
Description
•