5 #ifndef PFC_LEAK_STATIC_OBJECTS 6 #define PFC_LEAK_STATIC_OBJECTS 1 12 #pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor" 15 #if !defined(_WINDOWS) && (defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) || defined(_WIN32_WCE)) 20 #define PFC_DLL_EXPORT 28 #ifndef _SYS_GUID_OPERATOR_EQ_ 29 #define _NO_SYS_GUID_OPERATOR_EQ_ //fix retarded warning with operator== on GUID returning int 34 #if !defined(PFC_WINDOWS_STORE_APP) && !defined(PFC_WINDOWS_DESKTOP_APP) 36 #ifdef WINAPI_FAMILY_PARTITION 37 #if ! WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 38 #define PFC_WINDOWS_STORE_APP // Windows store or Windows phone app, not a desktop app 39 #endif // #if ! WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) 40 #endif // #ifdef WINAPI_FAMILY_PARTITION 42 #ifndef PFC_WINDOWS_STORE_APP 43 #define PFC_WINDOWS_DESKTOP_APP 46 #endif // #if !defined(PFC_WINDOWS_STORE_APP) && !defined(PFC_WINDOWS_DESKTOP_APP) 48 #ifndef _SYS_GUID_OPERATOR_EQ_ 52 ((
unsigned long *) &rguid1)[0] == ((
unsigned long *) &rguid2)[0] &&
53 ((
unsigned long *) &rguid1)[1] == ((
unsigned long *) &rguid2)[1] &&
54 ((
unsigned long *) &rguid1)[2] == ((
unsigned long *) &rguid2)[2] &&
55 ((
unsigned long *) &rguid1)[3] == ((
unsigned long *) &rguid2)[3]);
79 return memcmp(&p_item1,&p_item2,
sizeof(
GUID)) == 0;
83 return memcmp(&p_item1,&p_item2,
sizeof(
GUID)) != 0;
90 #define PFC_MEMORY_SPACE_LIMIT ((t_uint64)1<<(sizeof(void*)*8-1)) 92 #define PFC_ALLOCA_LIMIT (4096) 94 #define INDEX_INVALID ((unsigned)(-1)) 101 #define _PFC_WIDESTRING(_String) L ## _String 102 #define PFC_WIDESTRING(_String) _PFC_WIDESTRING(_String) 104 #if defined(_DEBUG) || defined(DEBUG) 111 #define PFC_ASSERT(_Expression) ((void)0) 112 #define PFC_ASSERT_SUCCESS(_Expression) (void)( (_Expression), 0) 113 #define PFC_ASSERT_NO_EXCEPTION(_Expression) { _Expression; } 117 namespace pfc {
void myassert_win32(
const wchar_t * _Message,
const wchar_t *_File,
unsigned _Line); }
118 #define PFC_ASSERT(_Expression) (void)( (!!(_Expression)) || (pfc::myassert_win32(PFC_WIDESTRING(#_Expression), PFC_WIDESTRING(__FILE__), __LINE__), 0) ) 119 #define PFC_ASSERT_SUCCESS(_Expression) PFC_ASSERT(_Expression) 121 namespace pfc {
void myassert (
const char * _Message,
const char *_File,
unsigned _Line); }
122 #define PFC_ASSERT(_Expression) (void)( (!!(_Expression)) || (pfc::myassert(#_Expression, __FILE__, __LINE__), 0) ) 123 #define PFC_ASSERT_SUCCESS(_Expression) PFC_ASSERT( _Expression ) 126 #define PFC_ASSERT_NO_EXCEPTION(_Expression) { try { _Expression; } catch(...) { PFC_ASSERT(!"Should not get here - unexpected exception"); } } 134 #define NOVTABLE _declspec(novtable) 138 #define ASSUME(X) PFC_ASSERT(X) 140 #define ASSUME(X) __assume(X) 143 #define PFC_DEPRECATE(X) // __declspec(deprecated(X)) don't do this since VS2015 defaults to erroring these 144 #define PFC_NORETURN __declspec(noreturn) 145 #define PFC_NOINLINE __declspec(noinline) 149 #define ASSUME(X) PFC_ASSERT(X) 150 #define PFC_DEPRECATE(X) 151 #define PFC_NORETURN __attribute__ ((noreturn)) 218 #define PFC_INCLUDED 1
__inline bool __InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2)
bool operator==(REFGUID guidOne, REFGUID guidOther)
void myassert(const char *_Message, const char *_File, unsigned _Line)
bool operator!=(REFGUID guidOne, REFGUID guidOther)
void myassert_win32(const wchar_t *_Message, const wchar_t *_File, unsigned _Line)