]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynarray.h
wxFontEnumerator class for Motif/X
[wxWidgets.git] / include / wx / dynarray.h
index c15997d203aea8ab00a3ceae30d6a33edb52fa4b..caf4b814d1e2241ee043022b7e205381c11e912a 100644 (file)
@@ -174,9 +174,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 +239,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;                                               \
   }                                                                 \
                                                                     \