X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/54da4255a20216b070ec044ae2b8af75e9f2681f..a0b4c98b8aed2e0006d75adc158f526018650dba:/include/wx/dynarray.h diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index c15997d203..9f8f7a3ad0 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -43,15 +43,7 @@ callback compare function for quick sort must return negative value, 0 or positive value if pItem1 <, = or > pItem2 */ - -#if defined(__VISUALC__) - #define CMPFUNC_CONV _cdecl -#elif defined(__VISAGECPP__) - #define CMPFUNC_CONV _Optlink -#else // !Visual C++ - #define CMPFUNC_CONV -#endif // compiler -typedef int (CMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2); +typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2); // ---------------------------------------------------------------------------- /** @@ -174,9 +166,11 @@ class WXDLLEXPORT name : public wxBaseArray \ { \ public: \ name() \ - { size_t type = sizeof(T); \ + { \ + size_t type = sizeof(T); \ size_t sizelong = sizeof(long); \ - wxASSERT( type <= sizelong ); \ + if ( type > sizelong ) \ + { wxFAIL_MSG( _T("illegal use of DEFINE_ARRAY") ); } \ } \ \ name& operator=(const name& src) \ @@ -237,7 +231,8 @@ public: \ name(SCMPFUNC##T fn) \ { size_t type = sizeof(T); \ size_t sizelong = sizeof(long); \ - wxASSERT( type <= sizelong ); \ + if ( type > sizelong ) \ + { wxFAIL_MSG( _T("illegal use of DEFINE_ARRAY") ); } \ m_fnCompare = fn; \ } \ \