Author: tfaber
Date: Tue Oct 16 06:43:32 2012
New Revision: 57566
URL:
http://svn.reactos.org/svn/reactos?rev=57566&view=rev
Log:
[WIDL]
- Forward-declare coclasses as 'class' in C++ to fix MSVC warnings. Already
applied upstream.
CORE-6587 #resolve
Modified:
trunk/reactos/tools/widl/header.c
Modified: trunk/reactos/tools/widl/header.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/header.c?rev=57…
==============================================================================
--- trunk/reactos/tools/widl/header.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/header.c [iso-8859-1] Tue Oct 16 06:43:32 2012
@@ -1300,7 +1300,11 @@
{
fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", cocl->name);
fprintf(header, "#define __%s_FWD_DEFINED__\n", cocl->name);
+ fprintf(header, "#ifdef __cplusplus\n");
+ fprintf(header, "typedef class %s %s;\n", cocl->name, cocl->name);
+ fprintf(header, "#else\n");
fprintf(header, "typedef struct %s %s;\n", cocl->name, cocl->name);
+ fprintf(header, "#endif /* defined __cplusplus */\n");
fprintf(header, "#endif /* defined __%s_FWD_DEFINED__ */\n\n", cocl->name
);
}