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

Unified Diff: ipc/ipc_message_macros.h

Issue 10067023: Add support for default values of IPC_STRUCT_MEMBER. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tsepez feedback Created 8 years, 8 months 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
« no previous file with comments | « chrome/tools/ipclist/ipcfuzz.cc ('k') | ipc/ipc_message_null_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_macros.h
diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h
index f37c05b8ebd7470cd23f9f58fe840da7e8def242..0ef300e1451e05955679899db426904dcd1602d7 100644
--- a/ipc/ipc_message_macros.h
+++ b/ipc/ipc_message_macros.h
@@ -202,7 +202,9 @@
struct IPC_MESSAGE_EXPORT struct_name : parent { \
struct_name(); \
~struct_name();
-#define IPC_STRUCT_MEMBER(type, name) type name;
+// Optional variadic parameters specify the default value for this struct
+// member. They are passed through to the constructor for |type|.
+#define IPC_STRUCT_MEMBER(type, name, ...) type name;
#define IPC_STRUCT_END() };
// Message macros collect specific numbers of arguments and funnel them into
« no previous file with comments | « chrome/tools/ipclist/ipcfuzz.cc ('k') | ipc/ipc_message_null_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698