Simplify a macro in programs/oleview/typelib.c
Gerald Pfeifer
gerald at pfeifer.com
Tue Sep 15 15:37:32 CDT 2009
In the code below, x is never TYPEFLAG_FDISPATCHABLE, thus x !=
TYPEFLAG_FDISPATCHABLE is always true. In consequence the disjunction
is always true, which means that in turn the conjunction is always true.
This patch simplifies the code accordingly.
Gerald
ChangeLog:
Simplify ENUM_FLAGS in CreateInterfaceInfo.
diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c
index 236a670..92834aa 100644
--- a/programs/oleview/typelib.c
+++ b/programs/oleview/typelib.c
@@ -984,8 +984,7 @@ static void CreateInterfaceInfo(ITypeInfo *pTypeInfo, int cImplTypes, WCHAR *wsz
}
if(pTypeAttr->wTypeFlags)
{
-#define ENUM_FLAGS(x) if(pTypeAttr->wTypeFlags & x &&\
- (pTypeAttr->typekind != TKIND_DISPATCH || x != TYPEFLAG_FDISPATCHABLE))\
+#define ENUM_FLAGS(x) if(pTypeAttr->wTypeFlags & x)\
{\
AddToTLDataStrW(pTLData, wszComa);\
AddToTLDataStrW(pTLData, wszNewLine);\
More information about the wine-patches
mailing list