From 01cca00452b5cdfe3a83b108da1bc78b720c6f9c Mon Sep 17 00:00:00 2001 From: "jbates@chromium.org" Date: Mon, 16 Apr 2012 19:13:02 +0000 Subject: Add support for default values of IPC_STRUCT_MEMBER. Review URL: http://codereview.chromium.org/10067023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132435 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_message_macros.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ipc/ipc_message_macros.h') diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index f37c05b..0ef300e 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 -- cgit v1.1