]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/defs.h
add assertEquals(int,unsigned short) overload to resolve the ambiguity resulting...
[wxWidgets.git] / include / wx / defs.h
index 393d320a162be51c1b23d90e1ada77edac9287f7..fd2e5ead1f047b1067b7fa0dc44b25b5e267910a 100644 (file)
 #   pragma warning(disable:4355)    /* 'this' used in base member initializer list */
 #   pragma warning(disable:4511)    /*  copy ctor couldn't be generated */
 #   pragma warning(disable:4512)    /*  operator=() couldn't be generated */
+#   pragma warning(disable:4514)   /*  unreferenced inline func has been removed */
 #   pragma warning(disable:4710)    /*  function not inlined */
 
+    // TODO: this warning should really be enabled as it can be genuinely
+    //       useful, check where does it occur in wxWidgets
+    #pragma warning(disable: 4127) /*  conditional expression is constant */
+
     /* There are too many false positivies for this one, particularly when
        using templates like wxVector<T> */
     /* class 'foo' needs to have dll-interface to be used by clients of
        class 'bar'" */
 #   pragma warning(disable:4251)
 
+#   ifdef __VISUALC5__
     /* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */
     /* is buggy, and occurs for code that does actually get executed */
-#   if !defined __WXDEBUG__ && __VISUALC__ <= 1100
+#   ifndef __WXDEBUG__
 #       pragma warning(disable:4702)    /* unreachable code */
 #   endif
+
     /* The VC++ 5.0 warning 'C4003: not enough actual parameters for macro'
      * is incompatible with the wxWidgets headers since it is given when
      * parameters are empty but not missing. */
-#   if __VISUALC__ <= 1100
 #       pragma warning(disable:4003)    /* not enough actual parameters for macro */
 #   endif
 
+    /*
+       VC6 insists on complaining about 
+
+        return type for 'wxVector<T>::reverse_iterator::operator ->' is 'T **'
+        (ie; not a UDT or reference to a UDT.  Will produce errors if applied
+        using infix notation)
+
+       which is perfectly fine because template classes do routinely define
+       operators which don't make sense for all template parameter values
+       (besides this warning was removed in subsequent versions).
+     */
+    #ifdef __VISUALC6__
+        #pragma warning(disable: 4284)
+    #endif // VC6
+
     /*
        When compiling with VC++ 7 /Wp64 option we get thousands of warnings for
        conversion from size_t to int or long. Some precious few of them might
@@ -786,18 +807,6 @@ typedef short int WXTYPE;
 /*  compiler specific settings */
 /*  ---------------------------------------------------------------------------- */
 
-/*  to allow compiling with warning level 4 under Microsoft Visual C++ some */
-/*  warnings just must be disabled */
-#ifdef  __VISUALC__
-  #pragma warning(disable: 4514) /*  unreferenced inline func has been removed */
-/*
-  you might be tempted to disable this one also: triggered by CHECK and FAIL
-  macros in debug.h, but it's, overall, a rather useful one, so I leave it and
-  will try to find some way to disable this warning just for CHECK/FAIL. Anyone?
-*/
-  #pragma warning(disable: 4127) /*  conditional expression is constant */
-#endif  /*  VC++ */
-
 #if defined(__MWERKS__)
     #undef try
     #undef except
@@ -1557,7 +1566,7 @@ enum wxAlignment
 enum wxSizerFlagBits
 {
     /* for compatibility only, default now, don't use explicitly any more */
-#if WXWIN_COMPATIBILITY_2_6
+#if WXWIN_COMPATIBILITY_2_8
     wxADJUST_MINSIZE               = 0,
 #endif
     wxFIXED_MINSIZE                = 0x8000,
@@ -2666,6 +2675,21 @@ enum wxUpdateUI
     wxUPDATE_UI_FROMIDLE      = 0x0002 /*  Invoked from On(Internal)Idle */
 };
 
+
+/* ---------------------------------------------------------------------------- */
+/* wxList types */
+/* ---------------------------------------------------------------------------- */
+
+/* type of compare function for list sort operation (as in 'qsort'): it should
+   return a negative value, 0 or positive value if the first element is less
+   than, equal or greater than the second */
+
+typedef int (* LINKAGEMODE wxSortCompareFunction)(const void *elem1, const void *elem2);
+
+/* wxList iterator function */
+typedef int (* LINKAGEMODE wxListIterateFunction)(void *current);
+
+
 /*  ---------------------------------------------------------------------------- */
 /*  miscellaneous */
 /*  ---------------------------------------------------------------------------- */