Commit af5019f3 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

include: Implement InlineIsEqualGUID.

parent 9d3687ad
...@@ -139,8 +139,20 @@ typedef GUID FMTID,*LPFMTID; ...@@ -139,8 +139,20 @@ typedef GUID FMTID,*LPFMTID;
#if defined(__cplusplus) && !defined(CINTERFACE) #if defined(__cplusplus) && !defined(CINTERFACE)
#define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID))) #define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID)))
inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
{
return (((ULONG *)&rguid1)[0] == ((ULONG *)&rguid2)[0] &&
((ULONG *)&rguid1)[1] == ((ULONG *)&rguid2)[1] &&
((ULONG *)&rguid1)[2] == ((ULONG *)&rguid2)[2] &&
((ULONG *)&rguid1)[3] == ((ULONG *)&rguid2)[3]);
}
#else /* defined(__cplusplus) && !defined(CINTERFACE) */ #else /* defined(__cplusplus) && !defined(CINTERFACE) */
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID))) #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
#define InlineIsEqualGUID(rguid1, rguid2) \
(((ULONG *)rguid1)[0] == ((ULONG *)rguid2)[0] && \
((ULONG *)rguid1)[1] == ((ULONG *)rguid2)[1] && \
((ULONG *)rguid1)[2] == ((ULONG *)rguid2)[2] && \
((ULONG *)rguid1)[3] == ((ULONG *)rguid2)[3])
#endif /* defined(__cplusplus) && !defined(CINTERFACE) */ #endif /* defined(__cplusplus) && !defined(CINTERFACE) */
#if defined(__cplusplus) && !defined(CINTERFACE) #if defined(__cplusplus) && !defined(CINTERFACE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment